Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
view your ssh public key's fingerprint; compare this to what Github has listed in the ssh key audit
$ ssh-keygen -l -f /path/to/keys/id_rsa.pub
2048 aa:bb:cc:dd:ee:ff:00:11:22:33:44:55:66:77:88:99 id_rsa.pub (RSA)
@bcackerman

This comment has been minimized.

Copy link

bcackerman commented Mar 7, 2012

"no such file or directory" error. What directory should I be in?

@bcackerman

This comment has been minimized.

Copy link

bcackerman commented Mar 7, 2012

ah cd ~/.ssh

@yosemitebandit

This comment has been minimized.

Copy link
Owner Author

yosemitebandit commented Mar 7, 2012

yup, it'll probably be ~/.ssh

edited the gist to be a little more clear.

@g2p

This comment has been minimized.

Copy link

g2p commented Mar 7, 2012

ssh-keygen -lv # displays pretty ASCIIart
ssh-keygen -B # displays easy to memorize gobbledigook

@sujee

This comment has been minimized.

Copy link

sujee commented Mar 7, 2012

thank you!
wish github had this instruction on the verify ssh keys page (https://github.com/settings/ssh)

@HennyN

This comment has been minimized.

Copy link

HennyN commented Mar 8, 2012

@sujee e.g.
ssh-keygen -l -f ~/.ssh/id_rsa.pub

@dkoudlo

This comment has been minimized.

Copy link

dkoudlo commented Feb 12, 2014

nice one +1

@jamesp9

This comment has been minimized.

Copy link

jamesp9 commented Apr 10, 2016

With newer versions of ssh
ssh-keygen -l -E md5 -f ~/.ssh/my-github-key.pub

@aioue

This comment has been minimized.

Copy link

aioue commented Jul 22, 2016

Thanks @jamesp9

@swift0701

This comment has been minimized.

Copy link

swift0701 commented Sep 14, 2016

👍 @jamesp9

@medington

This comment has been minimized.

Copy link

medington commented Oct 29, 2016

👍 @jamesp9

@tswast

This comment has been minimized.

Copy link

tswast commented Nov 3, 2016

If you are using something like a Yubikey, where there isn't necessarily a file to check, the ssh-add command takes an argument to change the fingerprint algorithm.

This outputs fingerprints in the format that GitHub displays:

ssh-add -l -E md5
@Ian-T-Price

This comment has been minimized.

Copy link

Ian-T-Price commented Sep 6, 2017

@betacoo

This comment has been minimized.

Copy link

betacoo commented Oct 10, 2017

thanks @jamesp9

@johnhamm

This comment has been minimized.

Copy link

johnhamm commented Nov 14, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.