0 votes
by (120 points)

I have two scenarios:
1. Have .ppk with a Passphrase.
2. Have only .ppk WITHOUT a Passphrase.

For the first scenario, this works:
privateKey = new SshPrivateKey(PrivateKeyPath, PrivateKeyPassPhrase);
_sftp.Login(UserName, privateKey)

But for the Second Scenario, I don't know how to load the private key without a passphrase and login.

Please advise.

Thanks.

Applies to: Rebex SFTP

1 Answer

0 votes
by (73.6k points)

If your .ppk has no password use:

PrivateKeyPassPhrase = "";
...