Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am using the lib ssh2 module with PHP and calling the function ssh2_fingerprint() to get the keys fingerprint. According to all resources on the internet, I can get the fingerprint of a public key by executing:

ssh-keygen -lf

Which outputs something like:

2048 d4:41:3b:45:00:49:4e:fc:2c:9d:3a:f7:e6:6e:bf:e7 (RSA)

However, when I call ssh2_fingerprint($connection, SSH2_FINGERPRINT_HEX) in PHP with the same public key I get:


Shouldn't they match? What am I missing?

share|improve this question

migrated from Oct 23 '13 at 2:49

This question came from our site for information security professionals.

Cross posted here:… – Evan Teitelman Oct 22 '13 at 23:31
Thanks, Evan. Deleted the other post. Still in search of an answer. – Justin Oct 22 '13 at 23:49

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.