Re: wodFtpDLX.NET PrivateKey - WeOnlyDo Discussion board

Re: wodFtpDLX.NET PrivateKey (General questions)

by woddrazen, Friday, February 11, 2011, 09:14 (5032 days ago) @ jschell

Hi,


Here is example you can use to connect to server using private key.
[code] Dim key As WeOnlyDo.Security.Cryptography.KeyManager
key = New WeOnlyDo.Security.Cryptography.KeyManager

key.Load( c:\private_key.txt , key_password )

Dim key_out As String
key_out = (key.ToXmlString(WeOnlyDo.Security.Cryptography.SSHKeyTypes.RSAKey, True))

Dim dlx1 As WeOnlyDo.Client.FtpDLX
dlx1 = New WeOnlyDo.Client.FtpDLX

dlx1.Hostname = your_hostname
dlx1.Protocol = WeOnlyDo.Client.Protocols.SFTP
dlx1.Authentication = WeOnlyDo.Client.Authentications.PublicKey
dlx1.Blocking = True
dlx1.Login = your_login
dlx1.PrivateKey = key_out
dlx1.Connect()[/code]
wodKeyManager.NET is part of wodFtpDLX.NET component.

Let us know how it goes.


Regards,
Drazen


Complete thread: