Skip to content

Instantly share code, notes, and snippets.

@jonatasnona
Forked from yosemitebandit/key-fingerprint
Created March 7, 2012 18:45
Show Gist options
  • Save jonatasnona/1995061 to your computer and use it in GitHub Desktop.
Save jonatasnona/1995061 to your computer and use it in GitHub Desktop.
SSH: print ssh public key's fingerprint
$ ssh-keygen -l -f id_rsa.pub
2048 aa:bb:cc:dd:ee:ff:00:11:22:33:44:55:66:77:88:99 id_rsa.pub (RSA)
@usptact
Copy link

usptact commented Aug 23, 2017

For time travelers with new ssh-keygen binary: If you want to get the old format fingerprint, run this
ssh-keygen -E md5 -l -f your_public_key.pub

Copy link

ghost commented Jan 29, 2018

pub_key=id_rsa.pub
for hash in md5 sha256
do
ssh-keygen -E $hash -l -f $pub_key
done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment