Knowledgebase
How do I use a port other than 22 for SFTP?
Posted by Van Glass on 14 June 2008 12:26 AM
In the SshParameters class there is a setSshPort method. Use this to set the port to something other than 22.

For example:

SshParameters params = new SshParameters(hostname,username,password);
params.setSshPort(9022);

Sftp sftp = new Sftp(params);
sftp.connect();
(237 vote(s))
This article was helpful
This article was not helpful

Comments (0)
Post a new comment
 
 
Full Name:
Email:
Comments:
CAPTCHA Verification 
 
Please enter the text you see in the image into the textbox below. This is required to prevent automated registrations and form submissions.

Help Desk Software by Kayako fusion