Skip to content

Commit 1e843a3

Browse files
committed
ssh-libssh: reduce excessive verbose output about pubkey auth
The verbose message "Authentication using SSH public key file" was printed each time the ssh_userauth_publickey_auto() was called, which meant each time a packet was transferred over network because the API operates in non-blocking mode. This patch makes sure that the verbose message is printed just once (when the authentication state is entered by the SSH state machine).
1 parent 9622c35 commit 1e843a3

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

lib/ssh-libssh.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -618,6 +618,7 @@ static CURLcode myssh_statemach_act(struct connectdata *conn, bool *block)
618618
sshc->auth_methods = ssh_userauth_list(sshc->ssh_session, NULL);
619619
if(sshc->auth_methods & SSH_AUTH_METHOD_PUBLICKEY) {
620620
state(conn, SSH_AUTH_PKEY_INIT);
621+
infof(data, "Authentication using SSH public key file\n");
621622
}
622623
else if(sshc->auth_methods & SSH_AUTH_METHOD_GSSAPI_MIC) {
623624
state(conn, SSH_AUTH_GSSAPI);
@@ -670,8 +671,6 @@ static CURLcode myssh_statemach_act(struct connectdata *conn, bool *block)
670671

671672
}
672673
else {
673-
infof(data, "Authentication using SSH public key file\n");
674-
675674
rc = ssh_userauth_publickey_auto(sshc->ssh_session, NULL,
676675
data->set.ssl.key_passwd);
677676
if(rc == SSH_AUTH_AGAIN) {

0 commit comments

Comments
 (0)