X2Go Bug report logs - #1477
x2goclient doesn't prompt for password after authentication failure if server is using google-authenticator

version graph

Package: x2goclient; Maintainer for x2goclient is X2Go Developers <x2go-dev@lists.x2go.org>; Source for x2goclient is src:x2goclient.

Reported by: Toby <anothercoffee@googlemail.com>

Date: Mon, 8 Jun 2020 17:00:03 UTC

Severity: normal

Found in version 4.1.2.2

Reply or subscribe to this bug.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to x2go-dev@lists.x2go.org, X2Go Developers <x2go-dev@lists.x2go.org>:
Bug#1477; Package x2goclient. (Mon, 08 Jun 2020 17:00:04 GMT) (full text, mbox, link).


Acknowledgement sent to Toby <anothercoffee@googlemail.com>:
New Bug report received and forwarded. Copy sent to X2Go Developers <x2go-dev@lists.x2go.org>. (Mon, 08 Jun 2020 17:00:04 GMT) (full text, mbox, link).


Message #5 received at submit@bugs.x2go.org (full text, mbox, reply):

From: Toby <anothercoffee@googlemail.com>
To: submit@bugs.x2go.org
Subject: x2goclient doesn't prompt for password after authentication failure if server is using google-authenticator
Date: Mon, 8 Jun 2020 17:58:47 +0100
Package: x2goclient
Version: 4.1.2.2

I have installed Google Authenticator on my x2go server, and use
keyboard-interactive for ssh passwords. If I mistype my password in
x2goclient, it won't offer me another password prompt, but repeatedly
asks for the Verification code until sshd on the server gets bored and
closes the connection.

Expected behaviour: if the login is not successful, prompt for both
password and verification code again.

x2goserver: Scientific Linux 7.7 - 3.10.0-1062.12.1.el7.x86_64
x2goclient: Fedora 32 - 5.6.14-300.fc32.x86_64

Cheers
Toby


Information forwarded to x2go-dev@lists.x2go.org, X2Go Developers <x2go-dev@lists.x2go.org>:
Bug#1477; Package x2goclient. (Thu, 11 Jun 2020 10:35:02 GMT) (full text, mbox, link).


Acknowledgement sent to Toby <anothercoffee@googlemail.com>:
Extra info received and forwarded to list. Copy sent to X2Go Developers <x2go-dev@lists.x2go.org>. (Thu, 11 Jun 2020 10:35:02 GMT) (full text, mbox, link).


Message #10 received at 1477@bugs.x2go.org (full text, mbox, reply):

From: Toby <anothercoffee@googlemail.com>
To: 1477@bugs.x2go.org
Subject: Debug output
Date: Thu, 11 Jun 2020 11:32:48 +0100
Hi

I've now got some debug output (from an ubuntu VM, --debug doesn't
work for me on fedora).
With the correct password and validation code:

x2go-DEBUG-../src/sshmasterconnection.cpp:1207> Challenge
authentication requested.
x2go-DEBUG-../src/sshmasterconnection.cpp:1085> Have prompts: 1
x2go-DEBUG-../src/sshmasterconnection.cpp:1089> Prompt[0]: |Password: |
x2go-DEBUG-../src/sshmasterconnection.cpp:1093> Password request
x2go-DEBUG-../src/sshmasterconnection.cpp:1085> Have prompts: 1
x2go-DEBUG-../src/sshmasterconnection.cpp:1089> Prompt[0]: |Verification code: |
x2go-DEBUG-../src/sshmasterconnection.cpp:1109> Checking against known
prompt #0: "Verification code:"
x2go-DEBUG-../src/sshmasterconnection.cpp:1129> Verification code request
x2go-DEBUG-../src/sshmasterconnection.cpp:1085> Have prompts: 0
x2go-DEBUG-../src/sshmasterconnection.cpp:1171> Challenge authentication OK.
x2go-DEBUG-../src/sshmasterconnection.cpp:687> User authentication OK.
x2go-DEBUG-../src/sshmasterconnection.cpp:1708> LOGIN CHECK:"LOGIN OK\r\n"
x2go-DEBUG-../src/sshmasterconnection.cpp:1711> don't have interaction
x2go-DEBUG-../src/sshmasterconnection.cpp:1744> LOOP FINISHED
x2go-DEBUG-../src/sshmasterconnection.cpp:1748> No interaction needed,
continue session
x2go-DEBUG-../src/sshmasterconnection.cpp:702> Login Check - OK
x2go-DEBUG-../src/onmainwindow.cpp:2947> SSH connection established.

But with an incorrect password, I only get repeated Verification code prompts:

x2go-DEBUG-../src/sshmasterconnection.cpp:1207> Challenge
authentication requested.
x2go-DEBUG-../src/sshmasterconnection.cpp:1085> Have prompts: 1
x2go-DEBUG-../src/sshmasterconnection.cpp:1089> Prompt[0]: |Password: |
x2go-DEBUG-../src/sshmasterconnection.cpp:1093> Password request
x2go-DEBUG-../src/sshmasterconnection.cpp:1085> Have prompts: 1
x2go-DEBUG-../src/sshmasterconnection.cpp:1089> Prompt[0]: |Verification code: |
x2go-DEBUG-../src/sshmasterconnection.cpp:1109> Checking against known
prompt #0: "Verification code:"
x2go-DEBUG-../src/sshmasterconnection.cpp:1129> Verification code request
x2go-DEBUG-../src/sshmasterconnection.cpp:1085> Have prompts: 1
x2go-DEBUG-../src/sshmasterconnection.cpp:1089> Prompt[0]: |Password: |
x2go-DEBUG-../src/sshmasterconnection.cpp:1093> Password request
x2go-DEBUG-../src/sshmasterconnection.cpp:1085> Have prompts: 1
x2go-DEBUG-../src/sshmasterconnection.cpp:1089> Prompt[0]: |Verification code: |
x2go-DEBUG-../src/sshmasterconnection.cpp:1109> Checking against known
prompt #0: "Verification code:"
x2go-DEBUG-../src/sshmasterconnection.cpp:1129> Verification code request
x2go-DEBUG-../src/sshmasterconnection.cpp:1085> Have prompts: 1
x2go-DEBUG-../src/sshmasterconnection.cpp:1089> Prompt[0]: |Password: |
x2go-DEBUG-../src/sshmasterconnection.cpp:1093> Password request
x2go-DEBUG-../src/sshmasterconnection.cpp:1085> Have prompts: 1
x2go-DEBUG-../src/sshmasterconnection.cpp:1089> Prompt[0]: |Verification code: |
x2go-DEBUG-../src/sshmasterconnection.cpp:1109> Checking against known
prompt #0: "Verification code:"
x2go-DEBUG-../src/sshmasterconnection.cpp:1129> Verification code request
x2go-DEBUG-../src/sshmasterconnection.cpp:1085> Have prompts: 1
x2go-DEBUG-../src/sshmasterconnection.cpp:1089> Prompt[0]: |Password: |
x2go-DEBUG-../src/sshmasterconnection.cpp:1093> Password request


Information forwarded to x2go-dev@lists.x2go.org, X2Go Developers <x2go-dev@lists.x2go.org>:
Bug#1477; Package x2goclient. (Thu, 11 Jun 2020 12:20:01 GMT) (full text, mbox, link).


Acknowledgement sent to Toby <anothercoffee@googlemail.com>:
Extra info received and forwarded to list. Copy sent to X2Go Developers <x2go-dev@lists.x2go.org>. (Thu, 11 Jun 2020 12:20:02 GMT) (full text, mbox, link).


Message #15 received at 1477@bugs.x2go.org (full text, mbox, reply):

From: Toby <anothercoffee@googlemail.com>
To: 1477@bugs.x2go.org
Subject: Re: Debug output
Date: Thu, 11 Jun 2020 13:14:39 +0100
In fact further testing shows the same behaviour if you get either
your password or verification code wrong first time - a "Verification
code" loop that you can't get out of even if the password was correct
and the first verification code wasn't.

On Thu, Jun 11, 2020 at 11:32 AM Toby <anothercoffee@googlemail.com> wrote:
>
> Hi
>
> I've now got some debug output (from an ubuntu VM, --debug doesn't
> work for me on fedora).
> With the correct password and validation code:
>
> x2go-DEBUG-../src/sshmasterconnection.cpp:1207> Challenge
> authentication requested.
> x2go-DEBUG-../src/sshmasterconnection.cpp:1085> Have prompts: 1
> x2go-DEBUG-../src/sshmasterconnection.cpp:1089> Prompt[0]: |Password: |
> x2go-DEBUG-../src/sshmasterconnection.cpp:1093> Password request
> x2go-DEBUG-../src/sshmasterconnection.cpp:1085> Have prompts: 1
> x2go-DEBUG-../src/sshmasterconnection.cpp:1089> Prompt[0]: |Verification code: |
> x2go-DEBUG-../src/sshmasterconnection.cpp:1109> Checking against known
> prompt #0: "Verification code:"
> x2go-DEBUG-../src/sshmasterconnection.cpp:1129> Verification code request
> x2go-DEBUG-../src/sshmasterconnection.cpp:1085> Have prompts: 0
> x2go-DEBUG-../src/sshmasterconnection.cpp:1171> Challenge authentication OK.
> x2go-DEBUG-../src/sshmasterconnection.cpp:687> User authentication OK.
> x2go-DEBUG-../src/sshmasterconnection.cpp:1708> LOGIN CHECK:"LOGIN OK\r\n"
> x2go-DEBUG-../src/sshmasterconnection.cpp:1711> don't have interaction
> x2go-DEBUG-../src/sshmasterconnection.cpp:1744> LOOP FINISHED
> x2go-DEBUG-../src/sshmasterconnection.cpp:1748> No interaction needed,
> continue session
> x2go-DEBUG-../src/sshmasterconnection.cpp:702> Login Check - OK
> x2go-DEBUG-../src/onmainwindow.cpp:2947> SSH connection established.
>
> But with an incorrect password, I only get repeated Verification code prompts:
>
> x2go-DEBUG-../src/sshmasterconnection.cpp:1207> Challenge
> authentication requested.
> x2go-DEBUG-../src/sshmasterconnection.cpp:1085> Have prompts: 1
> x2go-DEBUG-../src/sshmasterconnection.cpp:1089> Prompt[0]: |Password: |
> x2go-DEBUG-../src/sshmasterconnection.cpp:1093> Password request
> x2go-DEBUG-../src/sshmasterconnection.cpp:1085> Have prompts: 1
> x2go-DEBUG-../src/sshmasterconnection.cpp:1089> Prompt[0]: |Verification code: |
> x2go-DEBUG-../src/sshmasterconnection.cpp:1109> Checking against known
> prompt #0: "Verification code:"
> x2go-DEBUG-../src/sshmasterconnection.cpp:1129> Verification code request
> x2go-DEBUG-../src/sshmasterconnection.cpp:1085> Have prompts: 1
> x2go-DEBUG-../src/sshmasterconnection.cpp:1089> Prompt[0]: |Password: |
> x2go-DEBUG-../src/sshmasterconnection.cpp:1093> Password request
> x2go-DEBUG-../src/sshmasterconnection.cpp:1085> Have prompts: 1
> x2go-DEBUG-../src/sshmasterconnection.cpp:1089> Prompt[0]: |Verification code: |
> x2go-DEBUG-../src/sshmasterconnection.cpp:1109> Checking against known
> prompt #0: "Verification code:"
> x2go-DEBUG-../src/sshmasterconnection.cpp:1129> Verification code request
> x2go-DEBUG-../src/sshmasterconnection.cpp:1085> Have prompts: 1
> x2go-DEBUG-../src/sshmasterconnection.cpp:1089> Prompt[0]: |Password: |
> x2go-DEBUG-../src/sshmasterconnection.cpp:1093> Password request
> x2go-DEBUG-../src/sshmasterconnection.cpp:1085> Have prompts: 1
> x2go-DEBUG-../src/sshmasterconnection.cpp:1089> Prompt[0]: |Verification code: |
> x2go-DEBUG-../src/sshmasterconnection.cpp:1109> Checking against known
> prompt #0: "Verification code:"
> x2go-DEBUG-../src/sshmasterconnection.cpp:1129> Verification code request
> x2go-DEBUG-../src/sshmasterconnection.cpp:1085> Have prompts: 1
> x2go-DEBUG-../src/sshmasterconnection.cpp:1089> Prompt[0]: |Password: |
> x2go-DEBUG-../src/sshmasterconnection.cpp:1093> Password request


Information forwarded to x2go-dev@lists.x2go.org, X2Go Developers <x2go-dev@lists.x2go.org>:
Bug#1477; Package x2goclient. (Thu, 11 Jun 2020 13:55:01 GMT) (full text, mbox, link).


Acknowledgement sent to Toby <anothercoffee@googlemail.com>:
Extra info received and forwarded to list. Copy sent to X2Go Developers <x2go-dev@lists.x2go.org>. (Thu, 11 Jun 2020 13:55:02 GMT) (full text, mbox, link).


Message #20 received at 1477@bugs.x2go.org (full text, mbox, reply):

From: Toby <anothercoffee@googlemail.com>
To: 1477@bugs.x2go.org
Subject: Re: Debug output
Date: Thu, 11 Jun 2020 14:50:22 +0100
I appreciate the whole ssh connection process is hairy as ****, and
thinking I've got a proper fix after a couple of hours poking about
looking at a single use case is naive, but the removal of one line
gets the behaviour I expect: if either the password or verification
code are incorrect, restart the authentication process

diff --git a/src/sshmasterconnection.cpp b/src/sshmasterconnection.cpp
index 667e0ef..34045de 100644
--- a/src/sshmasterconnection.cpp
+++ b/src/sshmasterconnection.cpp
@@ -1127,7 +1127,7 @@ bool SshMasterConnection::userChallengeAuth()
             if (has_challenge_auth_code_prompt) {
                 x2goDebug<<"Verification code request"<<endl;

-                challengeAuthPasswordAccepted=true;
+                // challengeAuthPasswordAccepted=true;
                 if(challengeAuthVerificationCode == QString::null)
                 {
                     keyPhraseReady=false;


This also works in the case of using an ssh proxy server with
google-authenticator.

Cheers
Toby


Information forwarded to x2go-dev@lists.x2go.org, X2Go Developers <x2go-dev@lists.x2go.org>:
Bug#1477; Package x2goclient. (Thu, 18 Jun 2020 11:40:01 GMT) (full text, mbox, link).


Acknowledgement sent to uli42@gmx.de:
Extra info received and forwarded to list. Copy sent to X2Go Developers <x2go-dev@lists.x2go.org>. (Thu, 18 Jun 2020 11:40:01 GMT) (full text, mbox, link).


Message #25 received at 1477@bugs.x2go.org (full text, mbox, reply):

From: Ulrich Sibiller <ulrich.sibiller@gmail.com>
To: Toby <anothercoffee@googlemail.com>, 1477@bugs.x2go.org
Subject: Re: [X2Go-Dev] Bug#1477: Debug output
Date: Thu, 18 Jun 2020 13:39:29 +0200
Thanks for the patch. I have forwarded this to the x2go-dev list. I
hope it will be integrated soon.

Uli

On Thu, Jun 18, 2020 at 11:52 AM Toby <anothercoffee@googlemail.com> wrote:
>
> I appreciate the whole ssh connection process is hairy as ****, and
> thinking I've got a proper fix after a couple of hours poking about
> looking at a single use case is naive, but the removal of one line
> gets the behaviour I expect: if either the password or verification
> code are incorrect, restart the authentication process
>
> diff --git a/src/sshmasterconnection.cpp b/src/sshmasterconnection.cpp
> index 667e0ef..34045de 100644
> --- a/src/sshmasterconnection.cpp
> +++ b/src/sshmasterconnection.cpp
> @@ -1127,7 +1127,7 @@ bool SshMasterConnection::userChallengeAuth()
>              if (has_challenge_auth_code_prompt) {
>                  x2goDebug<<"Verification code request"<<endl;
>
> -                challengeAuthPasswordAccepted=true;
> +                // challengeAuthPasswordAccepted=true;
>                  if(challengeAuthVerificationCode == QString::null)
>                  {
>                      keyPhraseReady=false;
>
>
> This also works in the case of using an ssh proxy server with
> google-authenticator.
>
> Cheers
> Toby
> _______________________________________________
> x2go-dev mailing list
> x2go-dev@lists.x2go.org
> https://lists.x2go.org/listinfo/x2go-dev


Send a report that this bug log contains spam.


X2Go Developers <owner@bugs.x2go.org>. Last modified: Tue Aug 4 00:35:51 2020; Machine Name: ymir.das-netzwerkteam.de

X2Go Bug tracking system

Debbugs is free software and licensed under the terms of the GNU Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.