I am very new to AutoIT scripting (and programming in general), so be kind.
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!
![:rolleyes:](http://aut1.autoit-cdn.com/forum/public/style_emoticons/default/rolleyes.gif)
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:](http://aut1.autoit-cdn.com/forum/public/style_emoticons/default/I_Love_AutoIt_Penguin_2.gif)