7

When I sshed into a remote client, I got a warning :

Warning: Permanently added 'xx.xx.xx.xx' (ECDSA) to the list of known hosts.

Where can I see the list of known hosts?

I tried cat ~/.ssh/known_hosts, but this returns data in some hashed form. Does anybody know the solution?

Roshin Raphel
  • 193
  • 1
  • 1
  • 7

2 Answers2

3

.ssh/known_hosts in your case doesn't store plaintext hostnames, but rather hashed values of hostnames. Therefore you can't just list host names from it.

As answered in by Cakemox the this question, you can set HashKnownHosts No in your ssh configuration so that SSH stores hostnames instead of hashes.

-1

You can easily do it by putting up this command

ssh-keygen -H -F (hostname) put in the name of the host.

  • 1
    Can you explain what do `-H` and `-F` options are meaning? I'm not sure this returns the content of ~/.ssh/known_hosts in a clear version. – Paul Rey Jul 31 '20 at 08:47
  • 1
    This give the hashes of the given host name if it was in the `known_hosts` file, but not a proper answer to the question. – Roshin Raphel Jul 31 '20 at 09:30