0

I'm trying to set authentication for sftp server using private and public key pair.

I have set an sftp server with Bitvise SSH Server on a local machine. I generated private and public keys with SSH Server. I have set the private key on the host key section of SSH Server, and have created a virtual account and set the public key to that account.

I want to create a c# application with SharpSSH to connect to the sftp server.

But which key should I put in the c# code? the private or the public key?

Thanks

pyram
  • 925
  • 9
  • 24
  • 43

1 Answers1

0

the public host key (in order to ensure that you are connecting to the right server) and the private user key (in order to authenticate the user).

salva
  • 9,943
  • 4
  • 29
  • 57