Version 4.3.2. This is a fresh install on a windows server 2003 box. I have a stored session using FTP port 21. The server I'm trying to connect to is behind the same firewall and is a windows server 2003 box as well. I can connect through the GUI perfectly fine. However, when I use a script to automate the process I call winscp and the stored session. It fails to connect to the ftp server because somehow it using port 22.
This is the command I'm using and I use this same exact process on three other servers in about 30 other scripts.
"echo open USERNAME@IP > E:\Filetransfers\ftppgp.txt
echo put *.* >> E:\Filetransfers\ftppgp.txt
echo bye >> E:\Filetransfers\ftppgp.txt
c:\windows\winscp.exe /log=E:\Filetransfers\pgpsrvLog%month%%day%%year%.txt /console /script=E:\Filetransfers\ftppgp.txt"
Here is the log:
". 2011-05-05 19:05:10.085 --------------------------------------------------------------------------
. 2011-05-05 19:05:10.085 WinSCP Version 4.3.2 (Build 1201) (OS 5.2.3790 Service Pack 2)
. 2011-05-05 19:05:10.085 Login time: Thursday, May 05, 2011 7:05:10 PM
. 2011-05-05 19:05:10.085 --------------------------------------------------------------------------
. 2011-05-05 19:05:10.085 Session name: FTPSJH@10.10.16.54
. 2011-05-05 19:05:10.085 Host name: 10.10.16.54 (Port: 22)
. 2011-05-05 19:05:10.085 User name: USERNAME (Password: No, Key file: No)
. 2011-05-05 19:05:10.085 Tunnel: No
. 2011-05-05 19:05:10.085 Transfer Protocol: SFTP (SCP)
. 2011-05-05 19:05:10.085 Ping type: -, Ping interval: 30 sec; Timeout: 15 sec
. 2011-05-05 19:05:10.085 Proxy: none
. 2011-05-05 19:05:10.085 SSH protocol version: 2; Compression: No
. 2011-05-05 19:05:10.085 Bypass authentication: No
. 2011-05-05 19:05:10.085 Try agent: Yes; Agent forwarding: No; TIS/CryptoCard: No; KI: Yes; GSSAPI: No
. 2011-05-05 19:05:10.085 Ciphers: aes,blowfish,3des,WARN,arcfour,des; Ssh2DES: No
. 2011-05-05 19:05:10.085 SSH Bugs: -,-,-,-,-,-,-,-,-
. 2011-05-05 19:05:10.085 SFTP Bugs: -,-
. 2011-05-05 19:05:10.085 Return code variable: Autodetect; Lookup user groups: Yes
. 2011-05-05 19:05:10.085 Shell: default
. 2011-05-05 19:05:10.085 EOL: 0, UTF: 2
. 2011-05-05 19:05:10.085 Clear aliases: Yes, Unset nat.vars: Yes, Resolve symlinks: Yes
. 2011-05-05 19:05:10.085 LS: ls -la, Ign LS warn: Yes, Scp1 Comp: No
. 2011-05-05 19:05:10.085 Local directory: default, Remote directory: home, Update: No, Cache: Yes
. 2011-05-05 19:05:10.085 Cache directory changes: Yes, Permanent: Yes
. 2011-05-05 19:05:10.085 DST mode: 1
. 2011-05-05 19:05:10.085 --------------------------------------------------------------------------
. 2011-05-05 19:05:10.085 Looking up host "10.10.16.54"
. 2011-05-05 19:05:10.085 Connecting to 10.10.16.54 port 22
. 2011-05-05 19:05:11.132 Failed to connect to 10.10.16.54: Network error: Connection refused"