plink – Auto Accepts security key


plink – Auto Accepts security key

Here is a script, that does the following:

  • Iterates through list of servers in listofServers.txt
  • Invokes plink against each host – while using built-in credential root and rootpwd
  • Uses echo command and passes in “y” to indicate that host password be received

for /f %%s in (listofServers.txt) do (

    echo 'Invocation on %%s ...'

    echo y | plink %%s -l root -pw rootpwd "hostname"



The keys are saved in:



SSH – Private – Key – Registry Location

Server - Key - PrivateKey

Store key in cache

Putty - SshHostKeys


Possible Error Messages:

  • Unable to open connection: Host does not exist
  • Access denied



Leave a Reply

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s