Failed to user Key authentication for SFTP (wodSFTP / wodSFTP.NET / wodSFTPdll)
Hi All,
I got a problem by Delphi using wodSFTPComLib & wodSSHKeyLib to send file to OpenSSH SFTP Server.
Use username and password to send file is work fine, but failed to send file by using key.
I have tested public/private key by Winscp and Xshell it's both work fine, that means I can confirm that the keys correct.
--------------------------------------------------
var k: Tkeys;
begin
k := TKeys.Create(self);
k.Load('c:\private_key');
PrivateKey := k.ToXmlString(RSAkey, true);
CoreSC.Authentication := authPubkey;
CoreSC.Connect1; // if I use Connect it will nothing be happened, I do not know why.
end
--> with error: Invalid username or password reported by server
Private key does not have password.
--------------------------------------------------
var k: Tkeys;
begin
k := TKeys.Create(self);
k.Load('c:\private_key');
PrivateKey := k.PrivateKey[RSAkey];
CoreSC.Authentication := authPubkey;
CoreSC.Connect1; // if I use Connect it will nothing be happened, I do not know why.
end
--> with error: Private key type could not be determined
how could it be solved, someone can help :)
Thanks!
TOM