WinSCP and scheduled tasks
Hello! I've a problem when using WinSCP with scheduled task. By using one of my accounts the task works fine without errors. When I try to set a different win user (in this case an user used to run batches and services) the transfer fails. It seems, if I understood correctly, that this "service" user can't use settings and skip the proxy.
This is the log file:
. 2017-09-12 18:42:45.620 --------------------------------------------------------------------------
. 2017-09-12 18:42:45.620 WinSCP Version 5.9.6 (Build 7601) (OS 6.3.9600 - Windows Server 2012 R2 Standard)
. 2017-09-12 18:42:45.620 Configuration: HKCU\Software\Martin Prikryl\WinSCP 2\
. 2017-09-12 18:42:45.620 Log level: Normal
. 2017-09-12 18:42:45.620 Local account: BIZ\SVC-PridBat-EUWS0114
. 2017-09-12 18:42:45.620 Working directory: D:\
. 2017-09-12 18:42:45.620 Process ID: 5580
. 2017-09-12 18:42:45.620 Command-line: "C:\Program Files (x86)\WinSCP\WinSCP.exe" /console=596 /consoleinstance=_5124_912 "/script=D:\Apps\WinSCP\WinSCP_ApiceFTP_ProdM.txt" "/log=D:\Apps\WinSCP\WinSCP_ApiceFTP_ProdM.log"
. 2017-09-12 18:42:45.620 Time zone: Current: GMT+2, Standard: GMT+1 (W. Europe Standard Time), DST: GMT+2 (W. Europe Daylight Time), DST Start: 26/03/2017, DST End: 29/10/2017
. 2017-09-12 18:42:45.620 Login time: 12 September 2017 18:42:45
. 2017-09-12 18:42:45.620 --------------------------------------------------------------------------
. 2017-09-12 18:42:45.620 Script: Retrospectively logging previous script records:
> 2017-09-12 18:42:45.620 Script: open iqelux@ftp.pqpro.net
. 2017-09-12 18:42:45.620 --------------------------------------------------------------------------
. 2017-09-12 18:42:45.620 Session name: iqelux@ftp.pqpro.net (Ad-Hoc site)
. 2017-09-12 18:42:45.620 Host name: ftp.pqpro.net (Port: 22)
. 2017-09-12 18:42:45.620 User name: iqelux (Password: No, Key file: No, Passphrase: No)
. 2017-09-12 18:42:45.620 Tunnel: No
. 2017-09-12 18:42:45.620 Transfer Protocol: SFTP (SCP)
. 2017-09-12 18:42:45.620 Ping type: Off, Ping interval: 30 sec; Timeout: 15 sec
. 2017-09-12 18:42:45.620 Disable Nagle: No
. 2017-09-12 18:42:45.620 Proxy: None
. 2017-09-12 18:42:45.620 Send buffer: 262144
. 2017-09-12 18:42:45.620 SSH protocol version: 2; Compression: No
. 2017-09-12 18:42:45.620 Bypass authentication: No
. 2017-09-12 18:42:45.620 Try agent: Yes; Agent forwarding: No; TIS/CryptoCard: No; KI: Yes; GSSAPI: No
. 2017-09-12 18:42:45.620 Ciphers: aes,chacha20,blowfish,3des,WARN,arcfour,des; Ssh2DES: No
. 2017-09-12 18:42:45.620 KEX: ecdh,dh-gex-sha1,dh-group14-sha1,rsa,WARN,dh-group1-sha1
. 2017-09-12 18:42:45.620 SSH Bugs: Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto
. 2017-09-12 18:42:45.620 Simple channel: Yes
. 2017-09-12 18:42:45.620 Return code variable: Autodetect; Lookup user groups: Auto
. 2017-09-12 18:42:45.620 Shell: default
. 2017-09-12 18:42:45.620 EOL: LF, UTF: Auto
. 2017-09-12 18:42:45.620 Clear aliases: Yes, Unset nat.vars: Yes, Resolve symlinks: Yes; Follow directory symlinks: No
. 2017-09-12 18:42:45.620 LS: ls -la, Ign LS warn: Yes, Scp1 Comp: No
. 2017-09-12 18:42:45.620 SFTP Bugs: Auto,Auto
. 2017-09-12 18:42:45.620 SFTP Server: default
. 2017-09-12 18:42:45.620 Local directory: default, Remote directory: home, Update: Yes, Cache: Yes
. 2017-09-12 18:42:45.620 Cache directory changes: Yes, Permanent: Yes
. 2017-09-12 18:42:45.620 Recycle bin: Delete to: No, Overwritten to: No, Bin path:
. 2017-09-12 18:42:45.620 DST mode: Unix
. 2017-09-12 18:42:45.620 --------------------------------------------------------------------------
. 2017-09-12 18:42:45.620 Looking up host "ftp.pqpro.net" for SSH connection
. 2017-09-12 18:42:45.714 Connecting to 94.23.210.229 port 22
. 2017-09-12 18:43:06.730 Failed to connect to 94.23.210.229: Network error: Connection timed out
. 2017-09-12 18:43:06.730 Knocking FTP port.
. 2017-09-12 18:43:08.730 FTP port did not open.
This is the command line
"C:\Program Files (x86)\WinSCP\WinSCP.com" /script=D:\Apps\WinSCP\WinSCP_ApiceFTP_ProdM.txt /log=D:\Apps\WinSCP\WinSCP_ApiceFTP_ProdM.log
and this is the txt file
open iqelux@ftp.pqpro.net
synchronize remote \\EUWCL022-01\PrIDE_FS_PROD\Attach\ProdMxApice "/"
#close the session
close
#exit the scripting environment
exit
Any idea?
please reply to marco.crocco@electrolux.com
This is the log file:
. 2017-09-12 18:42:45.620 --------------------------------------------------------------------------
. 2017-09-12 18:42:45.620 WinSCP Version 5.9.6 (Build 7601) (OS 6.3.9600 - Windows Server 2012 R2 Standard)
. 2017-09-12 18:42:45.620 Configuration: HKCU\Software\Martin Prikryl\WinSCP 2\
. 2017-09-12 18:42:45.620 Log level: Normal
. 2017-09-12 18:42:45.620 Local account: BIZ\SVC-PridBat-EUWS0114
. 2017-09-12 18:42:45.620 Working directory: D:\
. 2017-09-12 18:42:45.620 Process ID: 5580
. 2017-09-12 18:42:45.620 Command-line: "C:\Program Files (x86)\WinSCP\WinSCP.exe" /console=596 /consoleinstance=_5124_912 "/script=D:\Apps\WinSCP\WinSCP_ApiceFTP_ProdM.txt" "/log=D:\Apps\WinSCP\WinSCP_ApiceFTP_ProdM.log"
. 2017-09-12 18:42:45.620 Time zone: Current: GMT+2, Standard: GMT+1 (W. Europe Standard Time), DST: GMT+2 (W. Europe Daylight Time), DST Start: 26/03/2017, DST End: 29/10/2017
. 2017-09-12 18:42:45.620 Login time: 12 September 2017 18:42:45
. 2017-09-12 18:42:45.620 --------------------------------------------------------------------------
. 2017-09-12 18:42:45.620 Script: Retrospectively logging previous script records:
> 2017-09-12 18:42:45.620 Script: open iqelux@ftp.pqpro.net
. 2017-09-12 18:42:45.620 --------------------------------------------------------------------------
. 2017-09-12 18:42:45.620 Session name: iqelux@ftp.pqpro.net (Ad-Hoc site)
. 2017-09-12 18:42:45.620 Host name: ftp.pqpro.net (Port: 22)
. 2017-09-12 18:42:45.620 User name: iqelux (Password: No, Key file: No, Passphrase: No)
. 2017-09-12 18:42:45.620 Tunnel: No
. 2017-09-12 18:42:45.620 Transfer Protocol: SFTP (SCP)
. 2017-09-12 18:42:45.620 Ping type: Off, Ping interval: 30 sec; Timeout: 15 sec
. 2017-09-12 18:42:45.620 Disable Nagle: No
. 2017-09-12 18:42:45.620 Proxy: None
. 2017-09-12 18:42:45.620 Send buffer: 262144
. 2017-09-12 18:42:45.620 SSH protocol version: 2; Compression: No
. 2017-09-12 18:42:45.620 Bypass authentication: No
. 2017-09-12 18:42:45.620 Try agent: Yes; Agent forwarding: No; TIS/CryptoCard: No; KI: Yes; GSSAPI: No
. 2017-09-12 18:42:45.620 Ciphers: aes,chacha20,blowfish,3des,WARN,arcfour,des; Ssh2DES: No
. 2017-09-12 18:42:45.620 KEX: ecdh,dh-gex-sha1,dh-group14-sha1,rsa,WARN,dh-group1-sha1
. 2017-09-12 18:42:45.620 SSH Bugs: Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto
. 2017-09-12 18:42:45.620 Simple channel: Yes
. 2017-09-12 18:42:45.620 Return code variable: Autodetect; Lookup user groups: Auto
. 2017-09-12 18:42:45.620 Shell: default
. 2017-09-12 18:42:45.620 EOL: LF, UTF: Auto
. 2017-09-12 18:42:45.620 Clear aliases: Yes, Unset nat.vars: Yes, Resolve symlinks: Yes; Follow directory symlinks: No
. 2017-09-12 18:42:45.620 LS: ls -la, Ign LS warn: Yes, Scp1 Comp: No
. 2017-09-12 18:42:45.620 SFTP Bugs: Auto,Auto
. 2017-09-12 18:42:45.620 SFTP Server: default
. 2017-09-12 18:42:45.620 Local directory: default, Remote directory: home, Update: Yes, Cache: Yes
. 2017-09-12 18:42:45.620 Cache directory changes: Yes, Permanent: Yes
. 2017-09-12 18:42:45.620 Recycle bin: Delete to: No, Overwritten to: No, Bin path:
. 2017-09-12 18:42:45.620 DST mode: Unix
. 2017-09-12 18:42:45.620 --------------------------------------------------------------------------
. 2017-09-12 18:42:45.620 Looking up host "ftp.pqpro.net" for SSH connection
. 2017-09-12 18:42:45.714 Connecting to 94.23.210.229 port 22
. 2017-09-12 18:43:06.730 Failed to connect to 94.23.210.229: Network error: Connection timed out
. 2017-09-12 18:43:06.730 Knocking FTP port.
. 2017-09-12 18:43:08.730 FTP port did not open.
This is the command line
"C:\Program Files (x86)\WinSCP\WinSCP.com" /script=D:\Apps\WinSCP\WinSCP_ApiceFTP_ProdM.txt /log=D:\Apps\WinSCP\WinSCP_ApiceFTP_ProdM.log
and this is the txt file
open iqelux@ftp.pqpro.net
synchronize remote \\EUWCL022-01\PrIDE_FS_PROD\Attach\ProdMxApice "/"
#close the session
close
#exit the scripting environment
exit
Any idea?
please reply to marco.crocco@electrolux.com