[X2Go-Commits] [x2goclient] 05/08: Handle SSHException 'Incompatible ssh peer (no acceptable kex algorithm)' gracefully.
git-admin at x2go.org
git-admin at x2go.org
Fri Dec 15 21:06:03 CET 2023
This is an automated email from the git hooks/post-receive script.
x2go pushed a commit to annotated tag 0.5.0.2
in repository x2goclient.
commit 730b0e1fbb15da990663899cd78d61316b3d8376
Author: Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
Date: Wed Dec 17 16:07:00 2014 +0100
Handle SSHException 'Incompatible ssh peer (no acceptable kex algorithm)' gracefully.
---
debian/changelog | 3 ++-
pyhoca/cli/frontend.py | 6 ++++--
2 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index 391a24b8..37f9fcd7 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,7 +1,8 @@
pyhoca-cli (0.5.0.2-0x2go2) UNRELEASED; urgency=medium
* New upstream version (0.5.0.2):
- - Continue development...
+ - Handle SSHException 'Incompatible ssh peer (no acceptable kex algorithm)'
+ gracefully.
* debian/control:
+ Bump Standards: to 3.9.6. No changes needed.
* debian/copyright:
diff --git a/pyhoca/cli/frontend.py b/pyhoca/cli/frontend.py
index 2c828c5c..04b9c40b 100644
--- a/pyhoca/cli/frontend.py
+++ b/pyhoca/cli/frontend.py
@@ -460,14 +460,16 @@ class PyHocaCLI(x2go.X2GoClient):
except x2go.AuthenticationException, e:
force_password_auth = True
self._pyhoca_logger('interactive login for user ,,%s\'\'' % _username, loglevel=x2go.loglevel_NOTICE, )
- self.args.password = getpass.getpass()
except x2go.BadHostKeyException:
self._runtime_error('SSH host key verification for remote host [%s]:%s failed' % (self.args.server, self.args.remote_ssh_port), exitcode=-254)
except x2go.SSHException, e:
- if str(e) != 'not a valid DSA private key file':
+ if str(e) not in ('not a valid DSA private key file', 'Incompatible ssh peer (no acceptable kex algorithm)'):
self._runtime_error(str(e), exitcode=253)
force_password_auth = True
+ if force_password_auth:
+ self.args.password = getpass.getpass()
+
# workaround for Python bug: http://bugs.python.org/issue11236
try:
if self.args.password is not None and '\x03' in self.args.password:
--
Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/x2goclient.git
More information about the x2go-commits
mailing list