This is an automated email from the git hooks/post-receive script. x2go pushed a commit to annotated tag 0.6.1.0 in repository x2goclient.
commit e86021e4a2a032e31b9fd8d65c894c8989856d30 Author: Mike Gabriel <mike.gabr...@das-netzwerkteam.de> Date: Sat Nov 10 16:05:59 2018 +0000 Fix failing password-only authentication. --- debian/changelog | 2 +- pyhoca/cli/frontend.py | 14 +++++++++++--- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/debian/changelog b/debian/changelog index 790599b4..2d1e459f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,7 +2,7 @@ pyhoca-cli (0.6.0.1-0x2go1) UNRELEASED; urgency=medium [ Mike Gabriel ] * New upstream release (0.6.0.1): - - Continue development... + - Fix failing password-only authentication. * debian/control: + Set Section: from "python" to "x11". More appropriate. diff --git a/pyhoca/cli/frontend.py b/pyhoca/cli/frontend.py index 01732cfc..76ad7624 100644 --- a/pyhoca/cli/frontend.py +++ b/pyhoca/cli/frontend.py @@ -547,6 +547,8 @@ class PyHocaCLI(x2go.X2GoClient): force_password_auth = True password = None passphrase = None + _auth_count += 1 + continue except x2go.AuthenticationException as e: @@ -594,6 +596,7 @@ class PyHocaCLI(x2go.X2GoClient): # this error gets thrown when the passphrase for unlocking the SSH privkey was wrong if not force_password_auth and passphrase_unlock_counter >= 1: + if passphrase is not None and passphrase != '': self._pyhoca_logger('wrong SSH key passphrase (%s), try again...' % self.args.ssh_privkey, loglevel=x2go.loglevel_WARN, ) self._pyhoca_logger('unlock SSH key file (%s)' % self.args.ssh_privkey, loglevel=x2go.loglevel_NOTICE, ) @@ -604,18 +607,22 @@ class PyHocaCLI(x2go.X2GoClient): continue if not force_password_auth and _auth_count >= 1: + self._pyhoca_logger('unlocking of SSH key failed, proceeding with interactive login', loglevel=x2go.loglevel_WARN, ) force_password_auth = True password = None passphrase = None + _auth_count += 1 + continue - elif not str(e).lower().startswith('not a valid dsa private key file') or \ - not str(e).lower().startswith('not a valid rsa private key file') or \ - not str(e).lower().startswith('incompatible ssh peer (no acceptable kex algorithm)') or \ + elif not str(e).lower().startswith('not a valid dsa private key file') and \ + not str(e).lower().startswith('not a valid rsa private key file') and \ + not str(e).lower().startswith('incompatible ssh peer (no acceptable kex algorithm)') and \ not str(e).lower().startswith('no authentication methods available') \ : if force_password_auth: + self._pyhoca_logger('password based login for ,,%s\'\' failed [SSHException]' % _username, loglevel=x2go.loglevel_WARN, ) else: self._pyhoca_logger('passwordless login for ,,%s\'\' failed [SSHException]' % _username, loglevel=x2go.loglevel_WARN, ) @@ -630,6 +637,7 @@ class PyHocaCLI(x2go.X2GoClient): force_password_auth = True password = None passphrase = None + _auth_count += 1 if not connected and _auth_count <= 0: if self.auth_attempts >= 2: -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/x2goclient.git _______________________________________________ x2go-commits mailing list x2go-commits@lists.x2go.org https://lists.x2go.org/listinfo/x2go-commits