Authenticate the public key provided tothe client. - WeOnlyDo Discussion board

Authenticate the public key provided tothe client. (wodSFTP / wodSFTP.NET / wodSFTPdll)

by sidharthapshenoy, Friday, April 22, 2016, 19:53 (3135 days ago)

Hi Team,

Sorry I am a newbie here. hence may be my question is slightly basic. Sorry for the same.

While doing an SFTP file transfer we have been advised by the security consultant that we need to authenticate if the server is the right one and has the right key available.
Could you please provide us source code where we can validate if the server has the right public key provided by us and if the key is valid( the server is authenticated) only then go ahead with the file transfer. ?

I am also not sure if the code below :
_wodSftp.Authentication = SFTP.Authentications.PublicKey

can be used to check if the public key is valid.

Please advise.

Thanks a lot for your advise.

Regards,
Sid

Authenticate the public key provided tothe client.

by Jasmine, Friday, April 22, 2016, 20:21 (3135 days ago) @ sidharthapshenoy

Hi Sid.

If you need to do publickey authentication, I believe this is the sample code you need:

http://www.weonlydo.com/code.asp?did=PublicKey-Authentication-in-SFTP

Kind regards,
Jasmine.