From 0173c638537e9a53a439ec4be5a9ab7b10a27a79 Mon Sep 17 00:00:00 2001 From: Christian Kandeler <christian.kandeler@theqtcompany.com> Date: Wed, 19 Aug 2015 16:33:25 +0200 Subject: [PATCH] SSH: Use "none" authentication type in case of an empty password. The "password" type as used until now should also be okay, but does not work with dropbear. Task-number: QTCREATORBUG-14913 Change-Id: I2fac255acf326e509f68c9de97c3cc9f00b2a373 Reviewed-by: hjk <hjk@theqtcompany.com> --- src/libs/ssh/sshoutgoingpacket.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/libs/ssh/sshoutgoingpacket.cpp b/src/libs/ssh/sshoutgoingpacket.cpp index 7a4a66f853e..dc3b916f2f8 100644 --- a/src/libs/ssh/sshoutgoingpacket.cpp +++ b/src/libs/ssh/sshoutgoingpacket.cpp @@ -112,9 +112,12 @@ void SshOutgoingPacket::generateServiceRequest(const QByteArray &service) void SshOutgoingPacket::generateUserAuthByPasswordRequestPacket(const QByteArray &user, const QByteArray &service, const QByteArray &pwd) { - init(SSH_MSG_USERAUTH_REQUEST).appendString(user).appendString(service) - .appendString("password").appendBool(false).appendString(pwd) - .finalize(); + init(SSH_MSG_USERAUTH_REQUEST).appendString(user).appendString(service); + if (pwd.isEmpty()) + appendString("none"); // RFC 4252, 5.2 + else + appendString("password").appendBool(false).appendString(pwd); + finalize(); } void SshOutgoingPacket::generateUserAuthByPublicKeyRequestPacket(const QByteArray &user, -- GitLab