7.9. Retrieving a Key Fingerprint

You are sending a public host key or identity key to another user, and you want the user to be able to verify that the key is genuine by confirming the key fingerprint. You didn't write down the fingerprint when the key was created—how do you find out what it is?

Use the ssh-keygen command:

	[carla@windbag:~/.ssh]$ ssh-keygen -l
	Enter file in which the key is (/home/carla/.ssh/id_rsa): id_mailserver
	1024 ce:5e:38:ba:fb:ec:e7:80:83:3e:11:1a:6f:b1:97:8b id_mailserver.pub

This is where old-fashioned methods of communication, like telephone and sneakernet, come in handy. Don't use email, unless you already have encrypted email set up with its own separate encryption and authentication because anyone savvy enough to perpetrate a man-in-the-middle attack will be more than smart enough to crack your email. Especially because the vast majority of email is still sent in the clear, so it's trivial to sniff it.