How to see the list of known hosts Ubuntu

11,854

.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.

Share:
11,854
Roshin Raphel
Author by

Roshin Raphel

Dev

Updated on September 18, 2022

Comments

  • Roshin Raphel
    Roshin Raphel almost 2 years

    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?

  • Paul Rey
    Paul Rey almost 4 years
    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.
  • Roshin Raphel
    Roshin Raphel almost 4 years
    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.