Hi, I'm still researching this. Maybe has nothing to with this but in our installation /authorizedKeys is a folder (not a file). And one of those files (inside /authorizedKeys) has the appended public key that's been rejected by ssh_userauth_try_publickey().
regards, bruno El mar., 28 jul. 2020 a las 8:25, Bruno Buzzi Brassesco (< bruno.brase...@gmail.com>) escribió: > Hi, > I can login with ssh command line: > ssh -i /custom-dir/ssh_keys/myPrivateKey somehost > > But libssh ssh_userauth_try_publickey() keep answering (1- > SSH_AUTH_DENIED): > 'Error :Access denied for ''publickey''. Authentication that can continue: > publickey,gssapi-keyex,gssapi-with-mic,password' > > Also ssh_session_is_known_server_() answer 1 (SSH_KNOWN_HOSTS_OK). > > It seems that the server does not accept my public key but i'm able to > login with ssh. > > Any hint on this ? > > regards, > bruno > > PS: i'm following the steps at: > https://api.libssh.org/stable/libssh_tutor_authentication.html > >