Post a reply

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

Soren

Re: Port number on command line is an option.

dan_linder wrote:

I have found that if you append the port to the end of the "scp://" URL, it works. Here's an example:
    scp://%username%:%password%@%computername%:%portnum%

Saves the time of writing a custom script.

For what it's worth, I'm using WinSCP 4.3.3 build 1340.

Dan


Thanks for the help, you're a genious!
martin

Re: Failed to connect

SnakeWood wrote:

I would like to add to this old post that I had a similar issue where I created a scheduled task to ftp a file to a sftp site. By default, it was picking up port 21 which is normal ftp and our firewall was blocking the connection. I added to the connection string :22 and in the log I was seeing that it had picked up the port 22 but still it was failing to connect. Finally, our network people made me change the command from "C:\Program Files (x86)\WinSCP\WinSCP.exe" to "C:\Program Files (x86)\WinSCP\WinSCP.com" and it fixed my problem and was now connecting using port 22. As it is using the command WinSCP instead of the executable.

Thought I should share this in case some people encounter the same issue.

Sorry, but this does not make any sense.
SnakeWood

Failed to connect

I would like to add to this old post that I had a similar issue where I created a scheduled task to ftp a file to a sftp site. By default, it was picking up port 21 which is normal ftp and our firewall was blocking the connection. I added to the connection string :22 and in the log I was seeing that it had picked up the port 22 but still it was failing to connect. Finally, our network people made me change the command from "C:\Program Files (x86)\WinSCP\WinSCP.exe" to "C:\Program Files (x86)\WinSCP\WinSCP.com" and it fixed my problem and was now connecting using port 22. As it is using the command WinSCP instead of the executable.

Thought I should share this in case some people encounter the same issue.
dan_linder

Port number on command line is an option.

I have found that if you append the port to the end of the "scp://" URL, it works. Here's an example:
    scp://%username%:%password%@%computername%:%portnum%

Saves the time of writing a custom script.

For what it's worth, I'm using WinSCP 4.3.3 build 1340.

Dan
cprasad111

specify PORT no. from command line

when i transfer a file from windows to unix using winscp.com (command line), it does not ask for port number.

when i try the same stuff in putty, the file transfer does not take place unless the PORT is specified.

How to specify the port in command line and why it's not asking for port number?
Does it use a default port (22), In my case, port no. of unix is 22. Is this the reason its not asking for port no. ?
If unix port was other than 22, would it still not ask the port ?