Subject: [libssh2] #309: latest libssh2 library fails to authenticate with public key (RSA) libssh2_userauth_publickey_fromfile

[libssh2] #309: latest libssh2 library fails to authenticate with public key (RSA) libssh2_userauth_publickey_fromfile

From: libssh2 Trac <trac_at_libssh2.stuge.se>
Date: Sat, 12 Dec 2015 13:06:51 -0000

#309: latest libssh2 library fails to authenticate with public key (RSA)
libssh2_userauth_publickey_fromfile
---------------------+--------------------
 Reporter: mohisan | Owner:
     Type: defect | Status: new
 Priority: high | Milestone: 1.4.3
Component: API | Version: 1.5.0
 Keywords: | Blocked By:
   Blocks: |
---------------------+--------------------
 libssh2 library was build against MinGW Makefiles and using OpenSSL.
 Target OS Windows 7.
 public/private key pair was generated using OpenSSL, without passphrase.
 I am using freeSSHd Server application, where I set a user "testuser" and
 authentication SSH public key only.

 My Code look like this:

 {{{

 // authenticate by public key.
 int iResult = libssh2_userauth_publickey_fromfile( mySession,
                 "testuser", "public.pem", "private.pem", NULL );

 }}}

 '''iResult''' always returns '''LIBSSH2_ERROR_PUBLICKEY_UNVERIFIED'''.
 what am I doing wrong?
 I really can't help myself and I couldn't find out what I am doing wrong.

 By the way '''libssh2_userauth_password''' works fine, but I need public
 key authentication

 Could you please help me.

 Mohi

-- 
Ticket URL: <https://trac.libssh2.org/ticket/309>
libssh2 <https://trac.libssh2.org/>
C library for writing portable SSH2 clients
_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
Received on 2015-12-12