Re: wodSFTP ActiveX with PrivateKey authentication - WeOnlyDo Discussion board

Re: wodSFTP ActiveX with PrivateKey authentication (General questions)

by wodSupport, Friday, August 13, 2004, 22:26 (7167 days ago) @ wodSupport

Following code works, make sure public key is copied on the server on appropriate place. wodSFTP ActiveX has to be imported in Delphi:
[code]procedure TForm1.FormCreate(Sender: TObject);
var
v: Variant;
begin
wodSFTP1.Hostname := 'put_your_host';
wodSFTP1.Login := 'put_your_login';
wodSFTP1.Authentication := 2;
wodSFTP1.Blocking := true;

v := CreateOleObject('WeOnlyDo.Keys.1');
v.Load('mykey.ppk');
wodSFTP1.PrivateKey := v.PrivateKeyData[0];
wodSFTP1.Connect();
end;[/code]


Complete thread: