This is an automated email from the git hooks/post-receive script. x2go pushed a change to branch master in repository pyhoca-cli. from 14eba70 pyhoca-cli.spec: also pick files matching PyHoca_CLI* in the site-lib directory. new e86021e Fix failing password-only authentication. The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "adds" were already present in the repository and have only been added to this reference. Summary of changes: debian/changelog | 2 +- pyhoca/cli/frontend.py | 14 +++++++++++--- 2 files changed, 12 insertions(+), 4 deletions(-) -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/pyhoca-cli.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch master in repository pyhoca-cli. commit e86021e4a2a032e31b9fd8d65c894c8989856d30 Author: Mike Gabriel <mike.gabriel@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 790599b..2d1e459 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 01732cf..76ad762 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/pyhoca-cli.git