Incremental failing after 1-2 days with "The server's host key was not found in the cache"
Hi all,
Hitting into an issue that I have never encountered before, and is starting to drive me insane... We have a script that runs every hour to incrementally pull new files in a remote location to a local working folder. The fetch script itself is working perfectly.
However, when run by Windows Task Scheduler, the script runs for a day or two, and then starts failing with: "The server's host key was not found in the cache."
Unlike other threads I can find on this matter, here's the weird bit:
1) We are already specifying the hostkey in the open command.
2) The script runs clean 100% of the time, if run manually from the command line or by double-clicking in Windows.
3) After running manually, the script will run automatically for some random amount of time between 1-2 days, before starting to fail with this error again.
The host key that it reports is not changing (or incorrect), and matches what we've set into the script.
Our script's 'open' command is set as:
... and the error that starts arriving in the logfile is:
And the reported key exactly matches the hostkey of our system, as well as the one manually specified.
This is running from Windows Server 2012 R2 Task Scheduler, and at this point we've even given the script the highest privileges, thinking that it was some kind of user profile issue, with the profile being reaped periodically. Have never had this issue before. Any thoughts would be appreciated!
Running WinSCP as WinSCP.com v5.7.6 on Win2k12R2.
Hitting into an issue that I have never encountered before, and is starting to drive me insane... We have a script that runs every hour to incrementally pull new files in a remote location to a local working folder. The fetch script itself is working perfectly.
However, when run by Windows Task Scheduler, the script runs for a day or two, and then starts failing with: "The server's host key was not found in the cache."
Unlike other threads I can find on this matter, here's the weird bit:
1) We are already specifying the hostkey in the open command.
2) The script runs clean 100% of the time, if run manually from the command line or by double-clicking in Windows.
3) After running manually, the script will run automatically for some random amount of time between 1-2 days, before starting to fail with this error again.
The host key that it reports is not changing (or incorrect), and matches what we've set into the script.
Our script's 'open' command is set as:
open user:pass@my.host.name -hostkey="ssh-rsa 2048 xx:yy:xx:yy:xx:yy:xx:yy:xx:yy:xx:yy:xx:yy:xx:yy"
... and the error that starts arriving in the logfile is:
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. The server's rsa2 key fingerprint is: ssh-rsa 2048 xx:yy:xx:yy:xx:yy:xx:yy:xx:yy:xx:yy:xx:yy:xx:yy
And the reported key exactly matches the hostkey of our system, as well as the one manually specified.
This is running from Windows Server 2012 R2 Task Scheduler, and at this point we've even given the script the highest privileges, thinking that it was some kind of user profile issue, with the profile being reaped periodically. Have never had this issue before. Any thoughts would be appreciated!
Running WinSCP as WinSCP.com v5.7.6 on Win2k12R2.