Putty: how to supress security alerts?
Solution 1:
I use AutoHotkey to create a script that runs in the background and scans for any particular warning popups that I don't care about, closing them automatically.
#Persistent
SetTimer, ClosePopups, 100 ; Check every 1/10 of a second
return
ClosePopups:
; Putty popup definition
IfWinExist, PuTTY Security Alert
{
WinActivate PuTTY Security Alert
Send !y ; Press Alt+Y
}
; Here's another example of a popup definition, for reference
IfWinExist, Cisco AnyConnect Secure Mobility Client
{
WinGetText, output, Cisco AnyConnect Secure Mobility Client
if output contains Connecting to this server may result in a severe security compromise
{
WinActivate Cisco AnyConnect Secure Mobility Client
Send {Tab}{Space}
}
}
return
Solution 2:
There doesn't seem to be any hope:
No, there isn't. And there won't be. Even if you write it yourself and send us the patch, we won't accept it.
Solution 3:
I found a solution for this.
Whenever you log in through Putty to any machine for first time, you will get that security message. Click Yes and it will cache the server’s host key in your system. The alert will not be displayed if you log in as the same user next time.
So the trick is:
Check in Appdata\Local Folder
After the host key is cached then you will see below mentioned files (.DAT and .RND) in the following location:
C:\Users\your_User\Appdata\Local
GDIPFONTCACHEV1.DAT and PUTTY.RND
Now just copy and paste both files for every user with which you want to log in at the same location C:\Users\Another_User\Appdata\Local
This worked for me.
Solution 4:
After much searching, found the answer here:
echo y | ssh -pw yourpassword [email protected]
http://www.governmentsecurity.org/forum/index.php?showtopic=29368
Solution 5:
The accepted host keys for a specific user are stored in the registry. Once the current user has accepted the key(s), they can then be made available to others by exporting the registry entries from the current user, modifying the path to the new user, and then importing them back in.
-
Using REGEDIT, export:
[HKEY_CURRENT_USER\Software\SimonTatham\PuTTY\SshHostKeys]
Open the .reg file that contains the export
-
Change all instances of
HKEY_CURRENT_USER
to
HKEY_USERS\S-x-x-xx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxx
where S-x-x-xx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxx
is the SID of the user in question.
-
Run the .reg file to import back into the registry for that user:
[HKEY_USERS\S-x-x-xx-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxx\Software\SimonTatham\PuTTY\SshHostKeys]
NOTE: Username/SID mappings can be found in:
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList]