Post a reply

Before posting, please read how to report bug or request support effectively.

Bug reports without an attached log file are usually useless.

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

martin

Re: scripting with winscp execute process task for agent job

LouisFD wrote:

. 2017-04-07 11:16:29.283 Reading key file "C:\Users\svcintradev\Desktop\putty\PrivateKey.ppk””"
. 2017-04-07 11:16:29.283 Unable to use this key file (unable to open file)
! 2017-04-07 11:16:29.283 Unable to use key file "C:\Users\svcintradev\Desktop\putty\PrivateKey.ppk””" (unable to open file)


Your local agent account probably does not have an access to C:\Users\svcintradev\Desktop\putty.
LouisFD

scripting with winscp execute process task for agent job

ALSO sorry i forgot the log file

07 10:48:07.971 Sent EOF message
. 2017-04-07 11:16:27.649 --------------------------------------------------------------------------
. 2017-04-07 11:16:27.649 WinSCP Version 5.9.3 (Build 7136) (OS 6.1.7601 Service Pack 1 - Windows Server 2008 R2 Enterprise)
. 2017-04-07 11:16:27.650 Configuration: nul
. 2017-04-07 11:16:27.650 Log level: Normal
. 2017-04-07 11:16:27.650 Local account: 1DC\svc-mer-prdsql
. 2017-04-07 11:16:27.650 Working directory: C:\Windows\system32
. 2017-04-07 11:16:27.650 Process ID: 16664
. 2017-04-07 11:16:27.651 Command-line: "C:\Program Files (x86)\WinSCP\WinSCP.exe" /console=593 /consoleinstance=_13020_7 "/log=F:\SSIS\Packages\Configs\AvayaODBC\WinSCP.log" "/ini=nul" "/command" "open sftp://UA01042-NFB001@prod-gw-na.1dc.com:6522/ -hostkey=""ssh-rsa 2048 66:1b:2d:94:2b:7a:f4:7b:8c:fd:d7:f5:55:04:e7:78"" -privatekey=""C:\Users\svcintradev\Desktop\putty\PrivateKey.ppk””" "put -nopreservetime F:\SSIS\Packages\Configs\AvayaODBC\CMSECHRP\CMSECHRP* ./" "exit"
. 2017-04-07 11:16:27.651 Time zone: Current: GMT-4, Standard: GMT-5 (Eastern Standard Time), DST: GMT-4 (Eastern Daylight Time), DST Start: 3/12/2017, DST End: 11/5/2017
. 2017-04-07 11:16:27.651 Login time: Friday, April 07, 2017 11:16:27 AM
. 2017-04-07 11:16:27.651 --------------------------------------------------------------------------
. 2017-04-07 11:16:27.651 Script: Retrospectively logging previous script records:
> 2017-04-07 11:16:27.651 Script: open sftp://UA01042-NFB001@prod-gw-na.1dc.com:6522/ -hostkey="ssh-rsa 2048 66:1b:2d:94:2b:7a:f4:7b:8c:fd:d7:f5:55:04:e7:78" -privatekey="C:\Users\svcintradev\Desktop\putty\PrivateKey.ppk””
. 2017-04-07 11:16:27.651 --------------------------------------------------------------------------
. 2017-04-07 11:16:27.651 Session name: UA01042-NFB001@prod-gw-na.1dc.com (Ad-Hoc site)
. 2017-04-07 11:16:27.651 Host name: prod-gw-na.1dc.com (Port: 6522)
. 2017-04-07 11:16:27.651 User name: UA01042-NFB001 (Password: No, Key file: Yes, Passphrase: No)
. 2017-04-07 11:16:27.651 Tunnel: No
. 2017-04-07 11:16:27.651 Transfer Protocol: SFTP
. 2017-04-07 11:16:27.651 Ping type: Off, Ping interval: 30 sec; Timeout: 15 sec
. 2017-04-07 11:16:27.651 Disable Nagle: No
. 2017-04-07 11:16:27.651 Proxy: None
. 2017-04-07 11:16:27.651 Send buffer: 262144
. 2017-04-07 11:16:27.651 SSH protocol version: 2; Compression: No
. 2017-04-07 11:16:27.651 Bypass authentication: No
. 2017-04-07 11:16:27.651 Try agent: Yes; Agent forwarding: No; TIS/CryptoCard: No; KI: Yes; GSSAPI: No
. 2017-04-07 11:16:27.651 Ciphers: aes,chacha20,blowfish,3des,WARN,arcfour,des; Ssh2DES: No
. 2017-04-07 11:16:27.651 KEX: ecdh,dh-gex-sha1,dh-group14-sha1,rsa,WARN,dh-group1-sha1
. 2017-04-07 11:16:27.651 SSH Bugs: Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto
. 2017-04-07 11:16:27.651 Simple channel: Yes
. 2017-04-07 11:16:27.651 Return code variable: Autodetect; Lookup user groups: Auto
. 2017-04-07 11:16:27.652 Shell: default
. 2017-04-07 11:16:27.652 EOL: LF, UTF: Auto
. 2017-04-07 11:16:27.652 Clear aliases: Yes, Unset nat.vars: Yes, Resolve symlinks: Yes; Follow directory symlinks: No
. 2017-04-07 11:16:27.652 LS: ls -la, Ign LS warn: Yes, Scp1 Comp: No
. 2017-04-07 11:16:27.652 SFTP Bugs: Auto,Auto
. 2017-04-07 11:16:27.652 SFTP Server: default
. 2017-04-07 11:16:27.652 Local directory: default, Remote directory: home, Update: Yes, Cache: Yes
. 2017-04-07 11:16:27.652 Cache directory changes: Yes, Permanent: Yes
. 2017-04-07 11:16:27.652 Recycle bin: Delete to: No, Overwritten to: No, Bin path:
. 2017-04-07 11:16:27.652 DST mode: Unix
. 2017-04-07 11:16:27.652 --------------------------------------------------------------------------
. 2017-04-07 11:16:27.652 Looking up host "prod-gw-na.1dc.com" for SSH connection
. 2017-04-07 11:16:27.664 Connecting to 10.180.204.47 port 6522
. 2017-04-07 11:16:27.716 We claim version: SSH-2.0-WinSCP_release_5.9.3
. 2017-04-07 11:16:27.765 Server version: SSH-2.0-SFTP Server
. 2017-04-07 11:16:27.765 We believe remote version has SSH-2 channel request bug
. 2017-04-07 11:16:27.765 Using SSH protocol version 2
. 2017-04-07 11:16:27.765 Have a known host key of type rsa2
. 2017-04-07 11:16:27.766 Doing Diffie-Hellman group exchange
. 2017-04-07 11:16:27.931 Doing Diffie-Hellman key exchange with hash SHA-256
. 2017-04-07 11:16:29.185 Host key fingerprint is:
. 2017-04-07 11:16:29.185 ssh-rsa 2048 66:1b:2d:94:2b:7a:f4:7b:8c:fd:d7:f5:55:04:e7:78
. 2017-04-07 11:16:29.185 Verifying host key rsa2 0x10001,0xe5be8aa0772e99c5 ba4195d18a2b8f6b 7db303f7e23d65a1 29d72581e9f90b37 ec71262600cb3736 6afde53213520eec b5c35d0713374b4a b86b6cb7a1bdfa1d 1a9658799998679f a18e3aff1acd3ef2 230f08053e25cd8d 8ddfe08419c63ce7 08ad4d81dd9ac3fb 42070e65b7321f3a e2a38f54ff1fcdc7 977c580e8afb0768 94fb2200ba4c7d85 455655c7b5ef3abf 59407e408be23dd4 b18006009956948a b0bddc9c02ae5ce0 8ae0b678a3aca918 7f389a9114d1c13b ef89cd5459571dd1 63ea78c2ca88bf7d 303d732569f07611 e6fa033b7cd99a47 090e9190e4f26eed dcc22fff6dc5175e c5202c53db5906a2 4c300391b994d91d d82fb73fee93261b with fingerprint ssh-rsa 2048 66:1b:2d:94:2b:7a:f4:7b:8c:fd:d7:f5:55:04:e7:78
. 2017-04-07 11:16:29.186 Host key matches configured key
. 2017-04-07 11:16:29.187 Initialised AES-256 SDCTR client->server encryption
. 2017-04-07 11:16:29.187 Initialised HMAC-SHA-256 client->server MAC algorithm
. 2017-04-07 11:16:29.187 Initialised AES-256 SDCTR server->client encryption
. 2017-04-07 11:16:29.187 Initialised HMAC-SHA-256 server->client MAC algorithm
. 2017-04-07 11:16:29.283 Reading key file "C:\Users\svcintradev\Desktop\putty\PrivateKey.ppk””"
. 2017-04-07 11:16:29.283 Unable to use this key file (unable to open file)
! 2017-04-07 11:16:29.283 Unable to use key file "C:\Users\svcintradev\Desktop\putty\PrivateKey.ppk””" (unable to open file)
! 2017-04-07 11:16:29.284 Using username "UA01042-NFB001".
. 2017-04-07 11:16:29.336 Server offered these authentication methods: password,publickey,keyboard-interactive
. 2017-04-07 11:16:29.336 Attempting keyboard-interactive authentication
. 2017-04-07 11:16:29.387 Prompt (keyboard interactive, "SSH server: password", "Using keyboard-interactive authentication.
. 2017-04-07 11:16:29.387 Enter password for UA01042-NFB001", "Password:")
. 2017-04-07 11:16:39.727 Keyboard-interactive authentication failed
! 2017-04-07 11:16:39.727 Access denied
. 2017-04-07 11:16:39.734 Server offered these authentication methods: password,publickey,keyboard-interactive
. 2017-04-07 11:16:39.735 Attempting keyboard-interactive authentication
. 2017-04-07 11:16:39.785 Prompt (keyboard interactive, "SSH server: password", "Using keyboard-interactive authentication.
. 2017-04-07 11:16:39.785 Enter password for UA01042-NFB001", "Password:")
. 2017-04-07 11:16:49.789 Disconnected: Unable to authenticate
LouisFD

scripting with winscp execute process task for agent job

Hi i have a package that i run manually and everything is fine but it will not run through sql agent job. i understand that this has possibly been answered here https://winscp.net/eng/docs/faq_scheduler but i am pretty new to this and still dont understand if there is a way to make this work outside of using a system timer to have this package run daily.