We have trouble to establish a connection to several sftp-servers with the current version of edtFtpNetPro. We use PublicKey authentication without passphrase. The authentication worked well with version 9.1.3.0.
We recently updated to 12.0.0.0 and receive the following error in the described scenario:
EnterpriseDT.Net.Ssh.Routrek.SSHC.SSHException: ClientPrivateKeyPassphrase property must be set to passphrase of the private key.
We also tried it with the current version (12.1.1.0), which also failed with that message.
We can narrow down the cause to the component, as no other changes have been made.
We authenticate with the key file only, without a passphrase. Therefore we do not set the mentioned property ClientPrivateKeyPassphrase
Here is a short code-example:
var connection = new SecureFTPConnection();
connection.ClientPrivateKeyFile = keyFile;
connection.AuthenticationMehtod = AuthenticationType.PublicKey;
connection.ServerAddress = host;
connection.ServerPort = port;
connection.UserName = username;
connection.ConnectMode = FTPConnectMode.PASV;
connection.Protocol = FileTransferProtocol.SFTP;
connection.Connect();