Quantcast
Channel: AutoIt v3 - General Help and Support
Viewing all articles
Browse latest Browse all 12506

Dealing with Host Keys in Plink through AutoIT

$
0
0
I am very new to AutoIT scripting (and programming in general), so be kind. :rolleyes: Can anyone tell me why this line of code won't work?

RunWait("echo y | plink -ssh -pw root root@" & $IPaddress & " exit")

I'm trying to deal with that annoying message: "The server's host key is not cached in the registry. You have no guarantee that the server is the computer you think it is.  The server's rsa2 key fingerprint is: ssh-rsa 1040.  If you trust this host, enter "y" to add the key to PuTTY's cache and carry on connecting.  If you want to carry on connecting just once, without adding the key to the cache, enter "n". If you do not trust this host, press Return to abandon the connection. Store key in cache? (y/n)"

If I type in the part in parenthesis directly into a command window, it will work as written. But when I run it in the script, it will get to the y/n prompt and stop, as though it doesn't recognize the "echo y |".

And certainly, if someone has a more appropriate way to get this done, I'm certainly open to it.

Thoughts, ideas, recommendations?

Thanks in advance!

:ILA3:

Viewing all articles
Browse latest Browse all 12506

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>