A
A
Alexander Vladimirovich2014-07-20 18:15:31
PHP
Alexander Vladimirovich, 2014-07-20 18:15:31

Where can I get a fingerprint to compare with the one received on the server?

Hello!
I connect via SSH using PHP
$connection = ssh2_connect('192.168.0.99', '22');
I get a fingerprint

$fp = ssh2_fingerprint($connection, SSH2_FINGERPRINT_MD5 | SSH2_FINGERPRINT_HEX);

After that I have to compare the received value. Where can I get this initial value for comparison?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Vladimirovich, 2014-07-20
@polyanin

I answer myself

ssh-keygen -lf /etc/ssh/ssh_host_rsa_key

ssh-keygen -lf /etc/ssh/ssh_host_dsa_key

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question