The Server's host key was not found in cache
WinSCP v. 4.3.2 build 1201
Windows Server Standard 2003 R2 SP2
When connecting to an SFTP server using the GUI Explorer interface, I can connect just fine. When I call an automated script from Windows Task Scheduler, I don't connect and the log file shows:
2011-09-27 15:06:04.479 If you trust this host, press Yes. To connect without adding host key to the cache, press No. To abandon the connection press Cancel.
. 2011-09-27 15:06:04.479
. 2011-09-27 15:06:04.479 Continue connecting and add host key to the cache? ()
. 2011-09-27 15:06:04.479 Attempt to close connection due to fatal exception:
* 2011-09-27 15:06:04.479 Host key wasn't verified!
. 2011-09-27 15:06:04.479 Closing connection.
. 2011-09-27 15:06:04.479 Sending special code: 12
My script file is:
@echo off
option batch on
option confirm off
open sftp://<username>:<password>@<host>.<domain>.com:228
cd /incoming
put d:\test file.txt
close
If I run the same script commands manually from a CLI, I can also connect and I never get propmted to accept the server key. How can I resolve this?
Thanks,
Ken
Windows Server Standard 2003 R2 SP2
When connecting to an SFTP server using the GUI Explorer interface, I can connect just fine. When I call an automated script from Windows Task Scheduler, I don't connect and the log file shows:
2011-09-27 15:06:04.479 If you trust this host, press Yes. To connect without adding host key to the cache, press No. To abandon the connection press Cancel.
. 2011-09-27 15:06:04.479
. 2011-09-27 15:06:04.479 Continue connecting and add host key to the cache? ()
. 2011-09-27 15:06:04.479 Attempt to close connection due to fatal exception:
* 2011-09-27 15:06:04.479 Host key wasn't verified!
. 2011-09-27 15:06:04.479 Closing connection.
. 2011-09-27 15:06:04.479 Sending special code: 12
My script file is:
@echo off
option batch on
option confirm off
open sftp://<username>:<password>@<host>.<domain>.com:228
cd /incoming
put d:\test file.txt
close
If I run the same script commands manually from a CLI, I can also connect and I never get propmted to accept the server key. How can I resolve this?
Thanks,
Ken