diff --git a/src/rpc/virnetlibsshsession.c b/src/rpc/virnetlibsshsession.c index 21eb9f2500..7c5f158f4d 100644 --- a/src/rpc/virnetlibsshsession.c +++ b/src/rpc/virnetlibsshsession.c @@ -637,8 +637,6 @@ virNetLibsshAuthenticatePassword(virNetLibsshSessionPtr sess, if (!(password = virAuthGetPasswordPath(sess->authPath, sess->cred, "ssh", sess->username, sess->hostname))) { - virReportError(VIR_ERR_INTERNAL_ERROR, "%s", - _("failed to retrieve password")); ret = SSH_AUTH_ERROR; goto cleanup; } diff --git a/src/rpc/virnetsshsession.c b/src/rpc/virnetsshsession.c index 6566f36ce0..35dc6c5356 100644 --- a/src/rpc/virnetsshsession.c +++ b/src/rpc/virnetsshsession.c @@ -726,11 +726,8 @@ virNetSSHAuthenticatePassword(virNetSSHSessionPtr sess, while (true) { if (!(password = virAuthGetPasswordPath(sess->authPath, sess->cred, "ssh", priv->username, - sess->hostname))) { - virReportError(VIR_ERR_INTERNAL_ERROR, "%s", - _("failed to retrieve password")); + sess->hostname))) goto cleanup; - } /* tunelled password authentication */ if ((rc = libssh2_userauth_password(sess->session,