sample code to connect to SFTP just like WinSCP? (wodSFTP / wodSFTP.NET / wodSFTPdll)

by mark.azali, (56 days ago)

I am trying to connect to an SFTP server that uses PPK. I am getting an error message of authentication failed at connectedevent

The information I have: hostname, login, pass, remote path, and the PPK file
sample vb

sftp1.hostname = "xxxxx"
sftp1.login = "xxxxx"
sftp1.password = "xxxxx"
Dim test As New WeOnlyDo.Security.Cryptography.Keys
test.Load("myprivatekey.ppk")
Sftp1.Authentication = WeOnlyDo.Client.SFTP.Authentications.Both
Sftp1.PrivateKey = test.PrivateKey(WeOnlyDo.Security.Cryptography.SSHKeyTypes.RSAKey)
sftp1.connect()

Is there a setting /event I'm missing to accept the fingerprint of server?


Complete thread: