How to know public key fingerprint
5 years back,one of my U.S system admin was very security conscious.He asked me to create id_rsa.pub key in server. I created the key with
ssh-keygen -t rsa command.And send it him through encrypted email.
Next day he wrote me ,what is the ssh key fingerprint ?
I said what the hack it is ,how to find it. At that time I found the answer.Today I think to share this info with you guys.
First have some intro:
Question: What is public key fingerprint
Answer : In public-key cryptography, a public key fingerprint is a short sequence of bytes used to authenticate or look up a longer public key. Fingerprints are created by applying a cryptographic hash function to a public key. Since fingerprints are shorter than the keys they refer to, they can be used to simplify certain key management tasks.
It is very simple to find.
Follow the given below command to get the public key finger print
Below both file will show you same result.
ssh-keygen -lf /etc/ssh/ssh_host_rsa_key.pub or ssh-keygen -lf /etc/ssh/ssh_host_rsa_key.pub
This is the reference of my output in my system
When you create a ssh key with the help of command “ssh-keygen -t rsa” or “ssh-keygen -t dsa” it has different fingerprint value . When you try to login with ssh key from other system it will ask you to accept the fingerprint value to add in known_hosts file ,the value exactly matches with ~/.ssh/id_rsa or ~/.ssh/id_rsa.pub file in your server.
To check fingerprint of ssh key,use the below command:
ssh-keygen -lf ~/.ssh/id_rsa or ssh-keygen -lf ~/.ssh/id_rsa.pub
This is the good example of learning about fingerprint click on my next blog link here https://sharadchhetri.com/2013/06/03/warning-remote-host-identification-has-changed/