Our Products:   CompleteFTP  edtFTPnet/Free  edtFTPnet/PRO  edtFTPj/Free  edtFTPj/PRO
0 votes
1.6k views
in .NET FTP by (150 points)
Hello,

I need to send files using Enterprise DT Pro for .net.

I tried following code:

SecureFTPConnection ftpConnection = new SecureFTPConnection();

            ftpConnection.LicenseOwner = "xxxxxxxxxxx";
            ftpConnection.LicenseKey = "111-1111-1111-1111";

            ftpConnection.ServerValidation = SecureFTPServerValidationType.Automatic;
            ftpConnection.Protocol = FileTransferProtocol.SFTP;
            ftpConnection.AuthenticationMethod = EnterpriseDT.Net.Ssh.AuthenticationType.PublicKey;
            ftpConnection.UserName = "XXXXXX";
            ftpConnection.ServerAddress = "XDXXXXXXXX";
            ftpConnection.ServerPort = NNN;
            ftpConnection.ClientPrivateKeyFile = @"C:\tmp\aaaaa";
            ftpConnection.ServerValidation = SecureFTPServerValidationType.None;

            ftpConnection.Connect();

Connect throw following exception :

An unhandled exception of type 'EnterpriseDT.Net.Ssh.Routrek.SSHC.SSHException' occurred in edtFTPnetPRO.dll

Additional information: ClientPrivateKeyPassphrase property must be set to passphrase of the private key.

Is there a way to configure SFTP to have a key file without a passphrase?

Do I need absolutly a key file encrypted with a pass?

This setup works fine with Filezilla.

Thank's

1 Answer

0 votes
by (162k points)
selected by
 
Best answer

You should have a passphrase on a private key. But if you don't, try setting ClientPrivateKeyPassphrase = ""

by (150 points)
Thank's for this rapid answer. It solved my problem.

Have a nice day.

Categories

...