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:

HKEY_CURRENT_USER
    \Software
       \SimonTatham
         \PuTTY
           \SshHostKeys

 

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

 

References:

About these ads
This entry was posted in SSH, SSH Host Keys, Technical. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com 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