PHP ssh2_fingerprint() does not match ssh-keygen -lf id_rsa.pub
- by Justin
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?