Re: public key - WeOnlyDo Discussion board

Re: public key (General questions)

by woddrazen, Wednesday, September 19, 2007, 10:39 (6073 days ago) @ Luca Colombo

Hi Luca,


Here is example how to generate and save PrivateKey and PublicKey using wodKeys component:

[code]
Dim key As Keys
Set key = New Keys

key.Generate RSAkey ' you can generate and save with wodKeys RSAkey or DSAkey
key.Save RSAkey, c:RSAprivate.txt , weonlydo ' weonlydo is password
key.PublicKeySave RSAkey, c:RSApublic.txt
Debug.Print key.PublicKeyOpenSSH(RSAkey)
[/code]

wodKeys component is part of wodSFTP ActiveX component.
PublicKey is part of PrivateKey. If you wish to connect to server with your PrivateKey, server need to have your PublicKey.

Here is example how to connect to server with PrivateKey:
[code]
Set sftp1 = New wodSFTPCom
Set key = New Keys

key.Load c:RSAprivate.txt , weonlydo

sftp1.HostName = your_hostname
sftp1.Authentication = authPubkey
sftp1.Login = your_login
sftp1.PrivateKey = key
sftp1.Connect
[/code]

PublicKey is part of PrivateKey. If you wish to connect to server with PrivateKey, server need to have your PublicKey.
You can generate and save PrivateKey and PublicKey with wodKeys component.
WodKeys component is part of wodSFTP ActiveX component.

If you wish you can test public key authentication with our testing server. To done that please send email to techsupport@weonlydo.com

Let us know how it goes.


Regards,
Drazen


Complete thread: