4

Whenever I connect for the first time to my raspberry pi, a message appears telling me to trust that 'fingerprint'. How do I know that that is my raspberry pi's fingerprint? When I search the web, I only find how to install a public and private key on my raspberry pi, but how does my Pi have a fingerprint if I never installed one? How was this fingerprint generated?

How can I see, at the terminal, which is the fingerprint of my raspberry pi? Does it means my Pi has a private and public key already?

3

Yes, your Pi has a key pair that was generated automatically (note this is the servers key not a personal user key). You can verify the key from the Pi's command line; by doing the following:

cd /etc/ssh
ssh-keygen -lf <insert file name here>

where file name will end in key.pub. You probably have more than one of these files and may need to compute the fingerprint for each of them depending on the key negotiated by your SSH client.

so for example:

cd /etc/ssh
ssh-keygen -lf ssh_host_rsa_key.pub

you can then compare the output of this with the thumbprint presented by your SSH client.

Reference and more details can be found here

  • You should add that this is only 100% secure if you check using a keyboard and the hdmi output of the pi first. If you don't have a monitor you need to ssh in to run this command. Aka a chicken or the egg problem – portforwardpodcast Apr 5 '15 at 12:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.