Using WINSCP from SSIS fails

Advertisement

eripet970
Guest

Using WINSCP from SSIS fails

Hi,

I'm using WINSCP from SSIS to transfer files to a server. I have created a script that looks like below:
------------------------------------------------------
option batch on
option confirm off
open MyServer-hostkey="ssh-rsa 2048 ........"
put C:\*.xml /home/
exit
------------------------------------------------------

I execute the script from SSIS and the problem is that the script usually runs ok but sometimes it can't connect to the server and leave the message:
2009-12-23 01:14:53.532 Looking up host "MyServer"

A total log dump is shown below
------------------------------------------------------
. 2009-12-23 01:14:53.530 WinSCP Version 4.2.4 (Build 610) (OS 6.0.6001 Service Pack 1)
. 2009-12-23 01:14:53.530 Login time: 23. december 2009 01:14:53
. 2009-12-23 01:14:53.530 --------------------------------------------------------------------------
. 2009-12-23 01:14:53.531 Session name: MyServer
. 2009-12-23 01:14:53.531 Host name: MyServer (Port: 22)
. 2009-12-23 01:14:53.531 User name:  (Password: No, Key file: No)
. 2009-12-23 01:14:53.531 Tunnel: No
. 2009-12-23 01:14:53.531 Transfer Protocol: SFTP (SCP)
. 2009-12-23 01:14:53.531 Ping type: -, Ping interval: 30 sec; Timeout: 15 sec
. 2009-12-23 01:14:53.531 Proxy: none
. 2009-12-23 01:14:53.531 SSH protocol version: 2; Compression: No
. 2009-12-23 01:14:53.531 Bypass authentication: No
. 2009-12-23 01:14:53.531 Try agent: Yes; Agent forwarding: No; TIS/CryptoCard: No; KI: Yes; GSSAPI: No
. 2009-12-23 01:14:53.531 Ciphers: aes,blowfish,3des,WARN,arcfour,des; Ssh2DES: No
. 2009-12-23 01:14:53.531 SSH Bugs: -,-,-,-,-,-,-,-,-
. 2009-12-23 01:14:53.531 SFTP Bugs: -,-
. 2009-12-23 01:14:53.531 Return code variable: Autodetect; Lookup user groups: Yes
. 2009-12-23 01:14:53.531 Shell: default, EOL: 0
. 2009-12-23 01:14:53.531 Clear aliases: Yes, Unset nat.vars: Yes, Resolve symlinks: Yes
. 2009-12-23 01:14:53.531 LS: ls -la, Ign LS warn: Yes, Scp1 Comp: No
. 2009-12-23 01:14:53.531 Local directory: default, Remote directory: home, Update: No, Cache: Yes
. 2009-12-23 01:14:53.531 Cache directory changes: Yes, Permanent: Yes
. 2009-12-23 01:14:53.531 DST mode: 1
. 2009-12-23 01:14:53.531 -----------------------------------------------------------------------
. 2009-12-23 01:14:53.532 Looking up host "MyServer"
------------------------------------------------------

From the SSIS log I just get a The process exit code was "1" while the expected was "0" so it is hard to find the problem. Anyone who has experienced the same problem or has some tips?

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
41,441
Location:
Prague, Czechia

Re: Using WINSCP from SSIS fails

eripet970 wrote:

open MyServer-hostkey="ssh-rsa 2048 ........"
There has to be a space before -hostkey.

Also please read FAQ. If that does not help, come back.

Reply with quote

eripet970
Guest

Thanks for the tips prikyl.

I have added the missing space and also isolated the problem to that the fact that the script only works if I am logged on to the machine during the execution of the script

The script is running under my normal user account but that doesn't seem to help. I have to environment variables and also changed so the settings is saved in winscp.ini file ( which every user has access to).

Any other tips?

Reply with quote

Advertisement

You can post new topics in this forum