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