Re: wodSFTP ActiveX with PrivateKey authentication - WeOnlyDo Discussion board

Re: wodSFTP ActiveX with PrivateKey authentication (General questions)

by davi_dk, Thursday, November 10, 2005, 15:02 (6735 days ago) @ wodSupport

Hi

I have tried to implement the ActiveX component to my c++builder6.
Works fine, but I would like to use it loading a public key and add it's passphrase to it. I think my problem is that I need to somehow import the wodKeys dll into the builder, but I fail to see how this should be done. I'm not able to find it anywhere.

Davi

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: