command line switch and that resolved the error, but now I get prompt every time with this:
continue connecting and add host key to cache? Yes, No, Cancel, Copy key?
The script will pause until I give an answer - yes, no or cancel. See log below. Also, I'll work on upgrading to the latest version. Thanks!
. 2016-10-31 10:45:56.669 --------------------------------------------------------------------------
. 2016-10-31 10:45:56.669 WinSCP Version 5.1.4 (Build 3020) (OS 6.1.7600)
. 2016-10-31 10:45:56.669 Configuration: nul
. 2016-10-31 10:45:56.671
. 2016-10-31 10:45:56.671 Working directory: C:\Scripts\IMMTrac
. 2016-10-31 10:45:56.671 Command-line: "C:\Program Files (x86)\WinSCP\WinSCP.exe" /console=514 /consoleinstance=_3100_487 "/script=c:\Scripts\IMMTrac\SFTP-dqa-report.txt" "/ini=nul" "/log=c:\scripts\immtrac\winscp.log"
. 2016-10-31 10:45:56.671 Time zone: Current: GMT-5, Standard: GMT-6, DST: GMT-5, DST Start: 3/13/2016, DST End: 11/6/2016
. 2016-10-31 10:45:56.671 Login time: Monday, October 31, 2016 10:45:56 AM
. 2016-10-31 10:45:56.671 --------------------------------------------------------------------------
. 2016-10-31 10:45:56.671 Session name: immtrac(Ad-Hoc session)
. 2016-10-31 10:45:56.671 Host name: immtrac
. 2016-10-31 10:45:56.671 User name: ##### (Password: Yes, Key file: No)
. 2016-10-31 10:45:56.671 Tunnel: No
. 2016-10-31 10:45:56.671 Transfer Protocol: SFTP
. 2016-10-31 10:45:56.671 Ping type: -, Ping interval: 30 sec; Timeout: 15 sec
. 2016-10-31 10:45:56.671 Proxy: none
. 2016-10-31 10:45:56.671 SSH protocol version: 2; Compression: No
. 2016-10-31 10:45:56.671 Bypass authentication: No
. 2016-10-31 10:45:56.671 Try agent: Yes; Agent forwarding: No; TIS/CryptoCard: No; KI: Yes; GSSAPI: No
. 2016-10-31 10:45:56.671 Ciphers: aes,blowfish,3des,WARN,arcfour,des; Ssh2DES: No
. 2016-10-31 10:45:56.671 SSH Bugs: A,A,A,A,A,A,A,A,A,A
. 2016-10-31 10:45:56.671 SFTP Bugs: A,A
. 2016-10-31 10:45:56.671 Return code variable: Autodetect; Lookup user groups: A
. 2016-10-31 10:45:56.671 Shell: default
. 2016-10-31 10:45:56.671 EOL: 0, UTF: 2
. 2016-10-31 10:45:56.671 Clear aliases: Yes, Unset nat.vars: Yes, Resolve symlinks: Yes
. 2016-10-31 10:45:56.671 LS: ls -la, Ign LS warn: Yes, Scp1 Comp: No
. 2016-10-31 10:45:56.671 Local directory: default, Remote directory: home, Update: Yes, Cache: Yes
. 2016-10-31 10:45:56.671 Cache directory changes: Yes, Permanent: Yes
. 2016-10-31 10:45:56.671 DST mode: 1; Timezone offset: 0h 0m
. 2016-10-31 10:45:56.671 --------------------------------------------------------------------------
. 2016-10-31 10:45:56.672 Looking up host "immtrac"
. 2016-10-31 10:45:56.681 Connecting to ######## port 22
. 2016-10-31 10:45:56.737 Server version: SSH-2.0-WS_FTP-SSH_7.6.3 FIPS
. 2016-10-31 10:45:56.737 Using SSH protocol version 2
. 2016-10-31 10:45:56.737 We claim version: SSH-2.0-WinSCP_release_5.1.4
. 2016-10-31 10:45:56.772 Using Diffie-Hellman with standard group "group14"
. 2016-10-31 10:45:56.772 Doing Diffie-Hellman key exchange with hash SHA-1
. 2016-10-31 10:45:57.203 Verifying host key rsa2
. 2016-10-31 10:45:57.203 Asking user:
. 2016-10-31 10:45:57.203 The server's host key was not found in the cache. You have no guarantee that the server is the computer you think it is.
. 2016-10-31 10:45:57.203
. 2016-10-31 10:45:57.203 The server's rsa2 key fingerprint is:
. 2016-10-31 10:45:57.203 ssh-rsa 1024
. 2016-10-31 10:45:57.203
. 2016-10-31 10:45:57.203 If you trust this host, press Yes. To connect without adding host key to the cache, press No. To abandon the connection press Cancel.
. 2016-10-31 10:45:57.203
. 2016-10-31 10:45:57.203 Continue connecting and add host key to the cache? ()
. 2016-10-31 10:46:10.715 Host key fingerprint is:
. 2016-10-31 10:46:10.715 ssh-rsa 1024 6f:a5:45:71:ed:35:41:d6:d0:7d:60:72:79:fb:2e:4c
. 2016-10-31 10:46:10.716 Initialised AES-256 SDCTR client->server encryption
. 2016-10-31 10:46:10.716 Initialised HMAC-SHA1 client->server MAC algorithm
. 2016-10-31 10:46:10.716 Initialised AES-256 SDCTR server->client encryption
. 2016-10-31 10:46:10.716 Initialised HMAC-SHA1 server->client MAC algorithm
! 2016-10-31 10:46:10.955 Using username "#####".
. 2016-10-31 10:46:11.194 Prompt (7, SSH password, , &Password: )
. 2016-10-31 10:46:11.194 Using stored password.
. 2016-10-31 10:46:11.194 Sent password
. 2016-10-31 10:46:11.222 Access granted
. 2016-10-31 10:46:11.237 Opened channel for session
. 2016-10-31 10:46:11.493 Started a shell/command
. 2016-10-31 10:46:11.493 --------------------------------------------------------------------------
. 2016-10-31 10:46:11.493 Using SFTP protocol.
. 2016-10-31 10:46:11.493 Doing startup conversation with host.
> 2016-10-31 10:46:11.494 Type: SSH_FXP_INIT, Size: 5, Number: -1
< 2016-10-31 10:46:11.513 Type: SSH_FXP_VERSION, Size: 5, Number: -1
. 2016-10-31 10:46:11.513 SFTP version 4 negotiated.
. 2016-10-31 10:46:11.513 We will use UTF-8 strings when appropriate
. 2016-10-31 10:46:11.513 Getting current directory name.
. 2016-10-31 10:46:11.513 Getting real path for '.'
> 2016-10-31 10:46:11.513 Type: SSH_FXP_REALPATH, Size: 10, Number: 16
< 2016-10-31 10:46:11.799 Type: SSH_FXP_NAME, Size: 23, Number: 16
. 2016-10-31 10:46:11.799 Real path is '/'
. 2016-10-31 10:46:11.799 Startup conversation with host finished.
< 2016-10-31 10:46:11.799 Script: Active session: [1] ####@immtrac#####.us
> 2016-10-31 10:46:11.800 Script: option transfer binary
< 2016-10-31 10:46:11.800 Script: transfer binary
> 2016-10-31 10:46:11.801 Script: synchronize local \\server\depts\ImmunizationErrorReports\dqa-report /dqa-report
< 2016-10-31 10:46:11.801 Script: Comparing...
. 2016-10-31 10:46:11.801 Collecting synchronization list for local directory '\\server\depts\ImmunizationErrorReports\dqa-report' and remote directory '/dqa-report', mode = 1, params = 2
. 2016-10-31 10:46:11.810 Local file '\\server\depts\ImmunizationErrorReports\dqa-report\.' [2016-10-31T13:15:06.494Z] [0] excluded from synchronization
. 2016-10-31 10:46:11.811 Local file '\\server\depts\ImmunizationErrorReports\dqa-report\..' [2014-12-13T04:20:42.149Z] [0] excluded from synchronization
.
> 2016-10-31 10:46:11.852 Type: SSH_FXP_OPENDIR, Size: 20, Number: 267
< 2016-10-31 10:46:11.967 Type: SSH_FXP_HANDLE, Size: 12, Number: 267
> 2016-10-31 10:46:11.967 Type: SSH_FXP_READDIR, Size: 12, Number: 524
< 2016-10-31 10:46:12.098 Type: SSH_FXP_NAME, Size: 16323, Number: 524
> 2016-10-31 10:46:12.099 Type: SSH_FXP_READDIR, Size: 12, Number: 780
< 2016-10-31 10:46:12.132 Type: SSH_FXP_NAME, Size: 222, Number: 780
> 2016-10-31 10:46:12.132 Type: SSH_FXP_READDIR, Size: 12, Number: 1036
< 2016-10-31 10:46:12.161 Type: SSH_FXP_STATUS, Size: 28, Number: 1036
< 2016-10-31 10:46:12.161 Status code: 1
> 2016-10-31 10:46:12.161 Type: SSH_FXP_CLOSE, Size: 12, Number: 1284
. 2016-10-31 10:46:12.175 Local file '\\server\depts\ImmunizationErrorReports\dqa-report\docwrl.16242.hl7.ack.hl7' [2016-10-27T20:43:50.035Z] [1064] is modifed comparing to remote file '/dqa-report/docwrl.16242.hl7.ack.hl7' [2016-09-15T10:39:14.000Z] [1064]
. 2016-10-31 10:46:12.181 Local file '\\server\depts\ImmunizationErrorReports\dqa-report\docwrl.16242.hl7.errors.txt' [2016-10-27T20:43:50.188Z] [0] is modifed comparing to remote file '/dqa-report/docwrl.16242.hl7.errors.txt' [2016-09-15T10:39:05.000Z] [0]
. 2016-10-31 10:46:12.181 Local file '\\server\depts\ImmunizationErrorReports\dqa-report\docwrl.16242.hl7.log.txt' [2016-10-27T20:43:49.888Z] [3299] is modifed comparing to remote file '/dqa-report/docwrl.16242.hl7.log.txt' [2016-09-15T10:39:14.000Z] [3299]
< 2016-10-31 10:46:12.214 Script: Synchronizing...
. 2016-10-31 10:46:12.218 Synchronizing local directory '\\server\depts\ImmunizationErrorReports\dqa-report\' with remote directory '/dqa-report/', params = 2
> 2016-10-31 10:46:12.218 Script: close
. 2016-10-31 10:46:12.218 Closing connection.
. 2016-10-31 10:46:12.218 Sending special code: 12
. 2016-10-31 10:46:12.218 Sent EOF message