Topic "Script hangs on prompt to accept new host key"

Author Message
alani
[View user's profile]
Donor
Joined: 2008-10-10
Posts: 4
Location: New Jersey, USA
I have a problem when the winscp host key has been deleted on a remote machine.

Next time we connect with a script, it hangs on the prompt "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..."

Is there a way to get the session to time out and fail?

Thanks
Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24512
Location: Prague, Czechia
Use "option batch abort" before connecting.
_________________
Martin Prikryl
alani
[View user's profile]
Donor
Joined: 2008-10-10
Posts: 4
Location: New Jersey, USA
Thanks Martin - that works if I use open in the script.

Is there a way to get it to work if we invoke using

winscp.com xxx /script=sss

where xxx is the stored session name?

Alan
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24512
Location: Prague, Czechia
No. You should not do this at all. If you still need to pass session name on command line, you can do:
winscp.com /command "option batch abort" "open xxx" /script=sss
But make sure there are no spaces in session name.
_________________
Martin Prikryl
Advertisements

You can post new topics in this forum






Search Site

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License