Subject: Re: using libssh2_userauth_publickey_frommemory()

Re: using libssh2_userauth_publickey_frommemory()

From: Will Cosgrove <will_at_panic.com>
Date: Fri, 27 Mar 2020 14:28:12 -0700

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.

Cheers,
Will

> I authenticate using libssh2_userauth_publickey_fromfile() and it
> works just fine. But when I switch to
> libssh2_userauth_publickey_frommemory()
> it fails.
>
> I am guessing that the keydata is wrong. Reading the documentation I
> find it vague. Is the keydata the string you would get from just
> loading key as a string ? just the base-64 data ? the data that you
> would get from base-64 decoding the string to binary ? I have tried
> all three interpretations of what "keydata" could mean. It still
> fails.
>
> Any insights ?
>
> --
> Dr Everett (Skip) Carter 0xF29BF36844FB7922
> skip_at_taygeta.com
>
> Taygeta Scientific Inc
> 607 Charles Ave
> Seaside CA 93955
> 831-641-0645 x103
>
> _______________________________________________
> libssh2-devel https://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel

_______________________________________________
libssh2-devel https://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
Received on 2020-03-27