Key authentication - WeOnlyDo Discussion board

Key authentication (General questions)

by Jasmine, Monday, March 25, 2019, 15:30 (1830 days ago) @ BrianG

Hi Brian,

wodFtpDLX.NET can do publickey-authentication in SFTP protocol, this is not a problem. You need private key to authenticate, public key is not enough.

Code is more less like this:


dlx1 = new WeOnlyDo.Client.FtpDLX();
key = new WeOnlyDo.Security.Cryptography.KeyManager();
key.Load("private.txt");
dlx1.Hostname = "xxx";
dlx1.Authentication = WeOnlyDo.Client.Authentications.PublicKey;
dlx1.Protocol = WeOnlyDo.Client.Protocols.SFTP;
dlx1.Login = "xxx";
dlx1.PrivateKey = key.ToXmlString(WeOnlyDo.Security.Cryptography.SSHKeyTypes.RSAKey, true);
dlx1.Blocking = true;
dlx1.Connect();

I hope this helps!
Jasmine.


Complete thread: