How to Get Host SSH Key Fingerprints

Here’s a short command line statement that will fetch the host ssh key fingerpring without authenticating with it:

ssh-keyscan host | ssh-keygen -lf -

Here’s another way to clean up ssh host key fingerprints:

# remove any old fingerprints for the host
ssh-keygen -R server.example.com
# add SSH fingerprints for the host
ssh-keyscan -t ecdsa,ed25519 -H server.example.com >> ~/.ssh/known_hosts 2>&1

 


Revision #1
Created 1 August 2025 07:47:51 by glwhite
Updated 1 August 2025 09:00:30 by glwhite