Subject: Re: Using libssh2_userauth_publickey_fromfile() when I don't have a public key

Re: Using libssh2_userauth_publickey_fromfile() when I don't have a public key

From: Jose Baars <peut_at_peut.org>
Date: Fri, 05 Nov 2010 10:11:36 +0100

Op 11/5/2010 12:39 AM, Thilee schreef:
> One doesn't really need to use a public key for auth, right?
> In my case, I have only the private key, which technically is sufficient to authenticate me (ssh -i pvtkeyfile ruser_at_rhost works).

I've been looking at that, too. The public key can be derived
(extracted) from the private key,
but that requires logic to do so. That logic is not available in
libssh2, maybe because
it is not SSH, but crypto functionality.

As a workaround, some flavours of ssh-keygen or puttygen can extract the
public key from
the private key and put it in a public key file to be used with libssh2.

I make do with this workaround for the time being, until me, you or
someone else adds
this functionality to libssh2.

Jose

_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel

Received on 2010-11-05