it2be_ftb :: createSFTPclient ::

Hello,
I got a problem creating a SFTPclient using it2be_ftb plugin.

My connection data to the SFTP server also includes a port address

and the

// set the settings needed to log into the server
// alternative is the use of a keystore instead of a password
var settings = plugins.it2be_ftp.createPasswordSettings("host", "user", "password");

// Create a client for the SFTP connection
var client = plugins.it2be_ftp.createSFTPclient(settings);

only includes ```
(“host”, “user”, “password”)


and I can not connect to the server...

How can I configure the port for a SFTPconnection

Thnak you

i think this belongs here: http://www.it2be.com/index.php/forum?ta … orum&id=42 ; but maybe try host:port ?

lvostinar:
but maybe try host:port ?

I have try that and is not working…
Many thanks

Is there anyway to change the port from the default 22. I have tried several combinations with no success. If anyone has some examples other than the one provided with the plugin it would be nice. I have been unsuccessful trying to find any help on the ftp plugin at other sites including it2be.

I fixed my own issue. Below is the code to connect to ssh server with non-default port “9999”

//set the settings needed to log into the server
	var settings = plugins.it2be_ftp.createPasswordSettings("host", "user", "password");

	// Create a client for the SFTP connection
	var client = plugins.it2be_ftp.createSFTPclient(settings);

      //setting new port 
	client.port = 9999;

	if(client.connect())
	{
		//code to process sftp transaction
	}