How do I use a non-standard SFTP Port? (ie. not 22)

0 votes
asked Jun 4, 2010 by Trevor (150 points)
edited Mar 26, 2011

Hi,

What is the best practice for setting a port in Rebex SFTP? ie. Let's say it is 2700, not 22. Do I just set the hostname as "sftp.mywebsite.com:2700"?

1 Answer

0 votes
answered Jun 4, 2010 by Martin Vobr (12,940 points)
edited Jun 4, 2010
 
Best answer

Try using following code:

Sftp client = new Sftp();
client.Connect("sftp.mywebsite.com",2700);
...
client.Disconnect();

You may find interesting following SFTP tutorial:

http://www.rebex.net/sftp.net/tutorial-sftp.aspx

...