Script hangs on prompt to accept new host key

Advertisement

alani
Donor
Joined:
Posts:
4
Location:
New Jersey, USA

Script hangs on prompt to accept new host key

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

Reply with quote

Advertisement

alani
Donor
Joined:
Posts:
4
Location:
New Jersey, USA

Re: Script hangs on prompt to accept new host key

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

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
27,253
Location:
Prague, Czechia

Re: Script hangs on prompt to accept new host key

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

Reply with quote

Advertisement

You can post new topics in this forum