Hacker News new | ask | show | jobs
by not-elite 1679 days ago
You can search `known_hosts` for a fingerprint using `ssh-keygen -l -f ~/.ssh/known_hosts` and `grep`. If you disable `HashKnownHosts` in your ssh config, the command will also tell you the name of the host(s) for that fingerprint, rather than its hash.

I use this all the time, because my AWS/Azure/GCP ips change constantly, but their pubkey fingerprints do not.

[1] https://www.schneier.com/blog/archives/2005/05/the_potential...