0 votes
by (320 points)
edited

Please let me know if I need to use any special method or class if I should connect to Port 22 so that I transport using SFTP connection.

Applies to: Rebex SFTP

1 Answer

0 votes
by (18.0k points)
edited

Port 22 is a default port for SFTP protocol. Using the Rebex SFTP component, you can simply connect the following way:

using Rebex.Net;
// ...

// create client object
Sftp client = new Sftp();

// connect to the server
client.Connect("servername.com");
// for connecting to non-default port, use the following alternative
// client.Connect("servername.com", 1234);

// authenticate
client.Login("username", "password");

// browse directories, transfer files, etc...
// ...

// disconnect
client.Disconnect();

For more information about using the component, see the SFTP tutorial page.

by (320 points)
edited

Where is this class Sftp ? I don't find this in Rebex.Net.

by (320 points)
edited

I think I need to use these dlls : Rebex.Sftp.dll, Rebex.Common.dll and Rebex.Networking.dll I will use it and check

by (18.0k points)
edited

Yes, the mentioned 3 DLLs are exactly what you need. They are content of the Rebex SFTP component.

Once you reference these 3 DLLs in your project, you'll be able to use the Rebex.Net.Sftp class.

by (320 points)
edited

hey i dont find Rebex.Common.dll and Rebex.Networking.dll in the exes which rebex gave us. These are the EXEs I looked into :

RebexSftp-Full-2.0.4086.0-DotNet2.0 RebexFtp-Full-3.0.4086.0-DotNet2.0 RebexFtpSsl-Full-3.0.4086.0-DotNet2.0

Am I missing Something ?

But I find Rebex.Sftp.dll in RebextSFTP exe and I referenced it in my project and am now able to use all the three methods which you have mentioned . Do I still need Rebex.Networking and Rebex.common ?

by (144k points)
edited

Thre three DLLs you both mentioned were introduced in Rebex SFTP 2012 R1 (released in March 2012). Rebex SFTP you have is an older version 2.0.4086 (released in March 2011). For that version, use Rebex.Security.dll, Rebex.Net.ProxySocket.dll, Rebex.Net.Ssh.dll and Rebex.Net.Sftp.dll and the same code Jan posted here.

Of course, upgrading to Rebex SFTP 2012 R3 is recommended - check out the blogpost to see what's new: http://blog.rebex.net/news/archive/2012/11/01/version-2012-r3.aspx

by (320 points)
edited

Cool. Is an upgrade free of cost ?

by (1.7k points)
moved by

Hi Bharad,

The upgrade to Rebex SFTP 2012 R3 is free of cost, provided you have got a valid Rebex Support Contract for this year.


In case you have not renewed your Support Contract yet, you can do that yearly for 1/2 of the original price of component.


If you wish to renew it now, please write me to: support@rebex.net and I will help you with the process.


František Bošek

...