How to add SSH known host to known host file on Windows?
PuTTY stores the known hosts in the Windows Registry. In the FAQ, they offer a Python script to convert an existing known_hosts
file to a Windows .REG file, but adding to ~/.ssh/known_hosts
won't add to the hosts that PuTTY trusts.
You can also add hosts individually by connecting via PuTTY and clicking Yes on the PuTTY Security Alert. To do this, either open the PuTTY GUI and fill out the required fields to connect, or invoke it from the command line: putty.exe username@hostname port
Related videos on Youtube
Dims
Software developer & Machine Learning engineer C/C++/Java/C#/Python/Mathematica/MATLAB/Kotlin/R/PHP/JavaScript/SQL/HTML/ LinkedIn: http://www.linkedin.com/in/dimskraft Telegram: https://t.me/dims12 I prefer fishing rod over fish.
Updated on September 18, 2022Comments
-
Dims over 1 year
The
known_hosts
file does not look trivial. On Windows I see it contains hostname, ip address and some RSA key.On linux I see it contains several keys separated by bar.
Who manages this file on Windows? How to add some host as "known" to this file on Windows?
Can Putty do this? If Putty has some host as known, can I copy this host record from Putty database to
~/.ssh/known_hosts
on Windows?-
Martin Prikryl almost 8 yearsWhy do you want to have
known_hosts
on Windows? -
user over 7 yearsFor OpenSSH, ~/.ssh/known_hosts can contain hashed host names (this is controlled by the HashKnownHosts configuration directive). Hashed host names start with a
|
character. Other SSH clients may work differently.
-