How to add SSH known host to known host file on Windows?

0

1

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?

Dims

Posted 2016-07-20T11:58:42.697

Reputation: 8 464

Why do you want to have known_hosts on Windows? – Martin Prikryl – 2016-07-20T12:09:41.097

For 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. – a CVn – 2017-02-09T21:37:26.533

Answers

1

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

chustedde

Posted 2016-07-20T11:58:42.697

Reputation: 11