I'm writing a Perl script to SSH into remote linux and maci machines from a windows. For that I'm running plink
(putty link) command using qx
. The problem is that when I try to run the plink
command it gives a prompt
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. ...... If you do not trust this host, press Return to abandon the connection. Store key in cache? (y/n)
I have to automate the process of running a command remotely. So, I somehow want to bypass this warning.
I could think of two ways of doing this but don't know how to accomplish these
- Somehow bypass this warning from putty itself through some command line options or other commands
- Some Perl way of passing input to
plink
when prompted
Can anyone suggest how to do this either in one of above ways or some other solutions.