Get SSH Key Fingerprint

I struggled a little to find out how to get the SSH fingerprint of an SSH key earlier so, I thought I would preserve how for ever more. The snippet below will return the SSH fingerprint for the machines public RSA key (under Debian derived distributions at least.)

$ ssh-keygen -lf /etc/ssh/ssh_host_rsa_key.pub
2048 d6:59:bc:0b:18:ba:17:15:41:fc:d0:2a:60:f4:7e:e8 /etc/ssh/ssh_host_rsa_key.pub

4 Responses to “Get SSH Key Fingerprint”

  1. vanden says:

    Thank you. It helps.

  2. dandin1 says:

    Thanks!

  3. Vas says:

    Doesn’t work for private key :(

Leave a Reply