Free Support Forum -

How to set passphrase parameter for SFTPClient

I need to connect to a server using SFTP and need to pass the following parameters:
- user
- private key
- passphrase

I haven't found any means to set the passphrase. Is this supported in the current version?

Best regards


Thank you for inquiry.

It requires an instance of AuthenticationInfo class for user credentials. Please refer to page for sample code and documentation.

I have seen this example already and still cannot see any option to set the passphrase. I do not mean the password to authenticate with the server, but the passphrase for the key file. Can this be passed in code as well?


The private key is loaded using the below line:
The file is in OpenSSH format, it contains only the private key and is un-encrypted, therefore no passphrase is required to load the private key.