I developed a script:
option batch on
option confirm off
open <session name>
cd <directory containing remote file>
get <remote file name> <local path>
exit
When I run open <session name> from the command window, it connects just fine. When I run the script in the Execute Process Task of SSIS, it prints:
Searching for host...
Host does not exist
Here is the excerpt from the log:
. 2010-08-12 17:54:56.459 --------------------------------------------------------------------------
. 2010-08-12 17:54:56.459 WinSCP Version 4.2.8 (Build 818) (OS 5.2.3790 Service Pack 2)
. 2010-08-12 17:54:56.459 Login time: Thursday, August 12, 2010 5:54:56 PM
. 2010-08-12 17:54:56.459 --------------------------------------------------------------------------
. 2010-08-12 17:54:56.459 Session name: D
. 2010-08-12 17:54:56.459 Host name: D (Port: -1)
. 2010-08-12 17:54:56.459 User name: (Password: No, Key file: No)
. 2010-08-12 17:54:56.459 Tunnel: No
. 2010-08-12 17:54:56.459 Transfer Protocol: SFTP (SCP)
. 2010-08-12 17:54:56.459 Ping type: -, Ping interval: 30 sec; Timeout: 15 sec
. 2010-08-12 17:54:56.459 Proxy: none
. 2010-08-12 17:54:56.459 SSH protocol version: 2; Compression: No
. 2010-08-12 17:54:56.459 Bypass authentication: No
. 2010-08-12 17:54:56.459 Try agent: Yes; Agent forwarding: No; TIS/CryptoCard: No; KI: Yes; GSSAPI: No
. 2010-08-12 17:54:56.459 Ciphers: aes,blowfish,3des,WARN,arcfour,des; Ssh2DES: No
. 2010-08-12 17:54:56.459 SSH Bugs: -,-,-,-,-,-,-,-,-
. 2010-08-12 17:54:56.459 SFTP Bugs: -,-
. 2010-08-12 17:54:56.459 Return code variable: Autodetect; Lookup user groups: Yes
. 2010-08-12 17:54:56.459 Shell: default
. 2010-08-12 17:54:56.459 EOL: 0, UTF: 2
. 2010-08-12 17:54:56.459 Clear aliases: Yes, Unset nat.vars: Yes, Resolve symlinks: Yes
. 2010-08-12 17:54:56.459 LS: ls -la, Ign LS warn: Yes, Scp1 Comp: No
. 2010-08-12 17:54:56.459 Local directory: default, Remote directory: home, Update: No, Cache: Yes
. 2010-08-12 17:54:56.459 Cache directory changes: Yes, Permanent: Yes
. 2010-08-12 17:54:56.459 DST mode: 1
. 2010-08-12 17:54:56.459 --------------------------------------------------------------------------
. 2010-08-12 17:54:56.459 Looking up host "D"
Thanks,
Jason