Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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 id_rsa.pub

Which outputs something like:

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

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

dddddba52352e5ab95711c10fdd56f43  

Shouldn't they match? What am I missing?

share|improve this question

migrated from security.stackexchange.com Oct 23 '13 at 2:49

This question came from our site for Information security professionals.

    
Cross posted here: stackoverflow.com/questions/19508258/… –  paraxor 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

 
discard

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