Subject: Re: using libssh2_userauth_publickey_frommemory()

Re: using libssh2_userauth_publickey_frommemory()

From: Skip Carter <>
Date: Fri, 27 Mar 2020 17:21:23 -0700


I found the problem: be careful with leading/trailing whitespace with
the keys. I augmented my application to first remove leading and
trailing whitespaces from the key data and it now works as expected.

Knowing from your tip that the key is just a copy if keyfile without
decoding saved me from lots of unnecessary testing.


On Fri, 2020-03-27 at 14:28 -0700, Will Cosgrove wrote:
> The frommemory() function takes a buffer that is the contents of the
> key file including header, etc with no decoding. It only works with
> the OpenSSL backend at the moment, IIRC.

Dr Everett (Skip) Carter  0xF29BF36844FB7922
Taygeta Scientific Inc
607 Charles Ave
Seaside CA 93955
831-641-0645 x103


Received on 2020-03-28