+1 vote
by (130 points)
edited

Using the KeyGenerator app I've generated SSH private and public keys. How do I specify the key in .Net code for a sFTP session?

1 Answer

0 votes
by (18.1k points)
edited

I expect you are going to use the keys for authentication to an SFTP server. In that case, you have to:

  • Put the public key somewhere on your SFTP server and associate it with some user account.
    For instance in the OpenSSH server, you have to add the public key into file ~/.ssh/authorized_keys.
    (see here how to transform a public key to the OpenSSH format).
  • When connecting to that SFTP server with the Rebex SFTP component, load the private key and use it for authentication as described here.

If you are going to use your public/private key another way, please write us more detailed description of your intent.

...