0 votes
by (120 points)

we are having problems sending sFTP messages using your sFTP tool with PPK private keys. We have managed to use .pem keys, but our company standard is using .ppk

we currently have a trial version , would you be able to confirm we can use .ppk and maybe send some sample code.

we are using the FTPack.1


Applies to: Rebex SFTP

1 Answer

+1 vote
by (145k points)

PuTTY .ppk private key format are supported. To authenticate using a .ppk private key, it should be possible to use the same code asfor .pem keys:

 // create client and connect 
 Sftp client = new Sftp();

 // verify the server's fingerprint (client.Fingerprint) 

 // load the private key
 SshPrivateKey privateKey = new SshPrivateKey("key_rsa.ppk", "password");

 // authenticate using the key
 client.Login(username, privateKey);

If this doesn't work, please let us know what kind of exception you get, we should be able to solve it. Does it fail when initializing the SshPrivateKey or inside the Login method?

If it's the Login method, a communication log produced using the Sftp object's LogWriter property (as described at http://www.rebex.net/kb/logging.aspx) might help - you can send it to support@rebex.net for analysis.