From: Yang Tse Date: Fri, 15 Feb 2008 17:00:56 +0000 (+0000) Subject: log SSH public key authentication failure and reason X-Git-Tag: curl-7_18_1~115 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=dc42d6fb8d5b0faaf801160b7d6b4c927843e43c;p=thirdparty%2Fcurl.git log SSH public key authentication failure and reason --- diff --git a/lib/ssh.c b/lib/ssh.c index c3cd435fd9..929f3cdc2e 100644 --- a/lib/ssh.c +++ b/lib/ssh.c @@ -628,6 +628,10 @@ static CURLcode ssh_statemach_act(struct connectdata *conn) state(conn, SSH_AUTH_DONE); } else { + char *err_msg; + (void)libssh2_session_last_error(sshc->ssh_session, + &err_msg, NULL, 0); + infof(data, "SSH public key authentication failed: %s\n", err_msg); state(conn, SSH_AUTH_PASS_INIT); } break;