Cannot access SSH key file in local folder path? - WeOnlyDo Discussion board

Cannot access SSH key file in local folder path? (wodFtpDLX / wodFtpDLX.NET)

by Kat, Tuesday, April 25, 2017, 23:16 (208 days ago) @ Jasmine

WeOnlyDo.Security.Cryptography.KeyManager keyManager = new WeOnlyDo.Security.Cryptography.KeyManager();
keyManager.Load("\\Computer\Folder\PrivateKey.pem", keyPassword); (works)
keyManager.Load("C:\Folder\PrivateKey.pem", keyPassword); (doesn't work)

//Set authentication to public key type.
wodDlx.Authentication = WeOnlyDo.Client.Authentications.PublicKey;

//Connect private key from wodKeyManager.NET to wodSFTP.NET.
wodDlx.Blocking = true; //Use synchronous connections
wodDlx.Login = login;
wodDlx.Hostname = hostAddress;
wodDlx.Protocol = WeOnlyDo.Client.Protocols.SFTP;
wodDlx.LicenseKey = licenseKey;
wodDlxPort = port;
wodDlx.PrivateKey = keyManager.ToXmlString(WeOnlyDo.Security.Cryptography.SSHKeyTypes.RSAKey, true);
wodDlx.Connect();


Complete thread: