Question about using NULL for public key and determining whether my distro built libssh2 against openssl

Reid Thompson reid.thompson at crunchydata.com
Tue Sep 27 23:20:04 CEST 2022


Hi,

If I use the following, the authentication succeeds.

        if (libssh2_userauth_publickey_fromfile(session, "rthompso",                                                                 
                            "/home/rthompso/.ssh/id_rsa.pub",                                                                        
                            "/home/rthompso/.ssh/id_rsa",                                                                            
                            NULL)) {                                                                                                 
            fprintf(stderr, "\tAuthentication by public key failed\n");

It fails if I set the public key to NULL.

The documentation states that if libssh2 is built against openssl that
the public key can be NULL.  Is there a way to determine if my distro built
libssh2 against openssl?  


Thanks,
reid



More information about the libssh2-devel mailing list