wodFtpDLX.NET PrivateKey - WeOnlyDo Discussion board

wodFtpDLX.NET PrivateKey (General questions)

by jschell, Friday, February 11, 2011, 01:53 (5033 days ago)

I am using wodFtpDLX.NET and no other.

I need to set the PrivateKey for SFTP.

Neither the documentation nor examples provide a way to do that.

Searching here the only solutions involve other products.

So how do I set it without using another product?

Re: wodFtpDLX.NET PrivateKey

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

Re: wodFtpDLX.NET PrivateKey

by jschell, Friday, February 11, 2011, 16:47 (5032 days ago) @ woddrazen

You suggested the following namespace

WeOnlyDo.Security.Cryptography

Exactly which assembly do I get that from in the product wodFtpDLX.NET?

Please tell me where in the installation I find that assembly because I have only found one assembly in that install and it does NOT have that namespace in it.

Re: wodFtpDLX.NET PrivateKey

by wodDamir, Friday, February 11, 2011, 17:02 (5032 days ago) @ jschell

Hi,

The Cryptography namespace is provided in WeOnlyDo.Security.Cryptography.KeyManager.dll. The same dll is included in wodFtpDLX.Net installation, and installed along with the component.

Regards,
Damba

Re: wodFtpDLX.NET PrivateKey

by jschell, Friday, February 11, 2011, 19:22 (5032 days ago) @ wodDamir

I have the following version: 1.4.1

I, just now, unzipped the delivered product: wodFtpDLX.NET1.4.1.zip
I, just now, ran the installer that is the only file in that zip.

It allows me to designate a directory. I picked one that I just created.
Choosing a directory is the only option I have.

It asks if I want it installed in the GAC. I refuse.

On completion I have the following in the directory I picked. There are not assembly/dlls in it.

---------------------------
License Agreement.txt
relnote.txt
Samples.lnk
wodFtpDLX.NET.chm
wodFtpDLX.NET.pdf
---------------------------

It also pops a window under Documents and Settings... . That directory has the following items.
The only relevant one to me would seem to be the Assembly.lnk .

---------------------------
All samples.lnk
Assembly folder.lnk
License Agreement.lnk
Release Notes.lnk
Samples
Samples folder.lnk
t.txt
Visit WeOnlyDo website.lnk
wodFtpDLX.NET Helpfile.lnk
wodFtpDLX.NET PDF Manual.lnk
-----------------------------

The Assembly directory (link) has the following items.

-----------------------------
WeOnlyDo.Client.FTP.dll
WeOnlyDo.Client.FTP.xml
-----------------------------

The above assembly does NOT have the namespace that you are referring to.

The Samples folder contains one dll which is the same as the above, the WeOnlyDo.Client.FTP.dll.

So again, what is the name of the assembly/dll that contains the namespace that you are referring to. And where can I find it in the installation?

Re: wodFtpDLX.NET PrivateKey

by wodDamir, Friday, February 11, 2011, 19:34 (5032 days ago) @ jschell

Hi,

Since you're using one of the older versions (in which it probably wasn't included) you can download a trial version of wodSSH.Net, wodSFTP.Net or latest version of wodFtpDLX.Net.

All of these components contain the .dll in question.

Regards,
Damba