EldoS | Feel safer!

Software components for data protection, secure storage and transfer

how to use privatekey in SimpleSFTPClient

Also by EldoS: CallbackDisk
Create virtual disks backed by memory or custom location, expose disk images as disks and more.
#6121
Posted: 05/05/2008 23:42:44
by levin ren (Standard support level)
Joined: 05/05/2008
Posts: 4

hi,
I try to use the privatekey to login sftp,but when connecting,application shown error,which's code is 96258.
This privatekey is normal,I can login sftp use this in WinSCP.

Please check the following script snapshot:

SftpClient := TElSimpleSFTPClient.Create(nil);
aPrivateKey := TElSSHKey.Create;
aPrivateKey.LoadPrivateKey('D:\PrivateKey.ppk');
FKeyStorage := TElSSHMemoryKeyStorage.Create(nil);
FKeyStorage.Add(aPrivateKey);
SftpClient.KeyStorage := FKeyStorage;
#6123
Posted: 05/06/2008 01:06:50
by levin ren (Standard support level)
Joined: 05/05/2008
Posts: 4

this question have been solved.
I forget to define AuthenticationTypes to SSH_AUTH_TYPE_PUBLICKEY

Reply

Statistics

Topic viewed 1287 times

Number of guests: 1, registered members: 0, in total hidden: 0




|

Back to top

As of July 15, 2016 EldoS Corporation will operate as a division of /n software inc. For more information, please read the announcement.

Got it!