Topic "Scripting for different port number"

Author Message
guyinkalamazoo

Guest


I know the default port for SFTP is 22, but what if the port is 2222? I am trying to write my first WinSCP script to connect to an external SFTP site for synching file folders (one they have with a local share here). I was able to use the winscp.exe gui to connect and browse the files (and get the hostkey), but need to automate this now. I have been reviewing the documentation on scripting, but have not seen the answer yet.

Ultimately this script will be run for an SSIS job which then further will use these files for data extraction, etc.

Thanks for the information.
JJS

Guest


In the Login-WinSCP screen, highlight the site you're connecting with/select manager/Generate Session URL.
Copy and paste to your script.
This should give you the command string along with :port value you've defined the site with.

Hope it helps.
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25015
Location: Prague, Czechia
@JJS Thanks for answering this.

Here is are links to documentation:
https://winscp.net/eng/docs/ui_generateurl
https://winscp.net/eng/docs/session_url
Advertisements

You can post new topics in this forum






Search Site

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License