All right, I've updated the batch file that calls the script, to include the path to the INI file:
Calling .bat file:
The batch file is as follows:
"C:\Program Files\WinSCP\WinSCP.exe" /console /ini=d:\scripts\my-script.ini /script=d:\scripts\my-script.txt /log=d:\logs\my-logfile.log
And the script still hangs. Here is the log output:
. 2012-06-28 17:05:00.209 --------------------------------------------------------------------------
. 2012-06-28 17:05:00.209 WinSCP Version 4.3.8 (Build 1771) (OS 5.2.3790 Service Pack 2)
. 2012-06-28 17:05:00.209 Configuration: d:\scripts\my-script.ini
. 2012-06-28 17:05:00.209 Local account: OURDOMAIN\ServiceAccount
. 2012-06-28 17:05:00.209 Login time: Thursday, June 28, 2012 5:05:00 PM
. 2012-06-28 17:05:00.209 --------------------------------------------------------------------------
. 2012-06-28 17:05:00.209 Session name: ftp-user@ftp4.RemoteDomain.com (Ad-Hoc session)
. 2012-06-28 17:05:00.209 Host name: ftp4.RemoteDomain.com (Port: 22)
. 2012-06-28 17:05:00.209 User name: ftp-user (Password: Yes, Key file: No)
. 2012-06-28 17:05:00.209 Tunnel: No
. 2012-06-28 17:05:00.209 Transfer Protocol: SFTP
. 2012-06-28 17:05:00.209 Ping type: -, Ping interval: 30 sec; Timeout: 15 sec
. 2012-06-28 17:05:00.209 Proxy: none
. 2012-06-28 17:05:00.209 SSH protocol version: 2; Compression: No
. 2012-06-28 17:05:00.209 Bypass authentication: No
. 2012-06-28 17:05:00.209 Try agent: Yes; Agent forwarding: No; TIS/CryptoCard: No; KI: Yes; GSSAPI: No
. 2012-06-28 17:05:00.209 Ciphers: aes,blowfish,3des,WARN,arcfour,des; Ssh2DES: No
. 2012-06-28 17:05:00.209 SSH Bugs: -,-,-,-,-,-,-,-,-
. 2012-06-28 17:05:00.209 SFTP Bugs: -,-
. 2012-06-28 17:05:00.209 Return code variable: Autodetect; Lookup user groups: Yes
. 2012-06-28 17:05:00.209 Shell: default
. 2012-06-28 17:05:00.209 EOL: 0, UTF: 2
. 2012-06-28 17:05:00.209 Clear aliases: Yes, Unset nat.vars: Yes, Resolve symlinks: Yes
. 2012-06-28 17:05:00.209 LS: ls -la, Ign LS warn: Yes, Scp1 Comp: No
. 2012-06-28 17:05:00.209 Local directory: default, Remote directory: home, Update: No, Cache: Yes
. 2012-06-28 17:05:00.209 Cache directory changes: Yes, Permanent: Yes
. 2012-06-28 17:05:00.209 DST mode: 1
. 2012-06-28 17:05:00.209 --------------------------------------------------------------------------
. 2012-06-28 17:05:00.209 Looking up host "ftp4.RemoteDomain.com"
. 2012-06-28 17:05:00.397 Connecting to 209.166.136.19 port 22
. 2012-06-28 17:05:00.506 Server version: SSH-2.0-6.0.4.118 SSH Tectia Server
. 2012-06-28 17:05:00.506 Using SSH protocol version 2
. 2012-06-28 17:05:00.506 We claim version: SSH-2.0-WinSCP_release_4.3.8
. 2012-06-28 17:05:05.241 Using Diffie-Hellman with standard group "group1"
. 2012-06-28 17:05:05.241 Doing Diffie-Hellman key exchange with hash SHA-1
. 2012-06-28 17:05:05.428 Host key fingerprint is:
. 2012-06-28 17:05:05.428 ssh-rsa 1536 01:02:03:04:05:72:f6:71:ac:ab:da:1f:e2:3f:53:2f
. 2012-06-28 17:05:05.428 Initialised AES-256 CBC client->server encryption
. 2012-06-28 17:05:05.428 Initialised HMAC-SHA1 client->server MAC algorithm
. 2012-06-28 17:05:05.428 Initialised AES-256 CBC server->client encryption
. 2012-06-28 17:05:05.428 Initialised HMAC-SHA1 server->client MAC algorithm
! 2012-06-28 17:05:05.663 Using username "ftp-user".
. 2012-06-28 17:05:20.663 Waiting for data timed out, asking user what to do.
. 2012-06-28 17:05:20.663 Asking user:
. 2012-06-28 17:05:20.663 Host is not communicating for 15 seconds.
. 2012-06-28 17:05:20.663
. 2012-06-28 17:05:20.663 Wait for another 15 seconds? ()
. 2012-06-28 17:05:20.663 Attempt to close connection due to fatal exception:
* 2012-06-28 17:05:20.663 Terminated by user.
. 2012-06-28 17:05:20.663 Closing connection.
. 2012-06-28 17:05:20.663 Sending special code: 12
In reviewing the .ini file, I see that it has not been updated since 48 hours ago, so I am not certain how to verify that the host key is cached in there. I am afraid that this may be the issue. I have anonymized the hostnames, etc, but will email the .ini file in its original state if requested.