update docs and deps

Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
This commit is contained in:
Nicola Murino
2022-03-11 17:11:49 +01:00
parent d8de0faef5
commit 48ed3dab1f
4 changed files with 47 additions and 47 deletions

View File

@@ -744,11 +744,13 @@ func (fs *SFTPFs) createConnection() error {
fsLog(fs, logger.LevelWarn, "login without host key validation, please provide at least a fingerprint!")
return nil
},
Timeout: 10 * time.Second,
ClientVersion: fmt.Sprintf("SSH-2.0-SFTPGo_%v", version.Get().Version),
}
if fs.config.PrivateKey.GetPayload() != "" {
signer, err := ssh.ParsePrivateKey([]byte(fs.config.PrivateKey.GetPayload()))
if err != nil {
fsLog(fs, logger.LevelError, "unable to parse the provided private key: %v", err)
fs.err <- err
return err
}
@@ -759,11 +761,13 @@ func (fs *SFTPFs) createConnection() error {
}
fs.sshClient, err = ssh.Dial("tcp", fs.config.Endpoint, clientConfig)
if err != nil {
fsLog(fs, logger.LevelError, "unable to connect: %v", err)
fs.err <- err
return err
}
fs.sftpClient, err = sftp.NewClient(fs.sshClient)
if err != nil {
fsLog(fs, logger.LevelError, "unable to create SFTP client: %v", err)
fs.sshClient.Close()
fs.err <- err
return err