Subject: Create host key fingerprint like ssh-keygen does

Create host key fingerprint like ssh-keygen does

From: Andreas Sommer <andreas.sommer87_at_googlemail.com>
Date: Fri, 18 Sep 2015 11:35:13 +0200

Hey,

I'm using libssh2_hostkey_hash(session, LIBSSH2_HOSTKEY_HASH_SHA1) as in
the example code [1], creating a fingerprint string like "11:22:...".
However this is not the fingerprint I get displayed when connecting with
"ssh HOSTNAME" for the first time, or when running "ssh-keygen -lf
PUBLICKEYFILE" against the server's public key.

Is there any way in libssh2 I could calculate the fingerprint in the
same way as OpenSSH does?

Thank you,
 Andreas

[1] http://www.libssh2.org/examples/sftpdir.html
_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
Received on 2015-09-18