[X2Go-Commits] python-x2go.git - build-baikal (branch) updated: 0.2.0.10-57-gfdfc794

X2Go dev team git-admin at x2go.org
Wed Jan 8 15:29:27 CET 2014


The branch, build-baikal has been updated
       via  fdfc7942b08d52562801713f25a1cf988225be65 (commit)
      from  f60285590b5485e4105071e1ce4020bf9026e1ef (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
-----------------------------------------------------------------------

Summary of changes:
 debian/changelog                 |    1 +
 x2go/backends/control/_stdout.py |   14 ++++++++------
 2 files changed, 9 insertions(+), 6 deletions(-)

The diff of changes is:
diff --git a/debian/changelog b/debian/changelog
index 89ac661..2437a2e 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -36,6 +36,7 @@ python-x2go (0.2.1.0-0~x2go1) UNRELEASED; urgency=low
       issue #14.
     - Set the session name in case a session start failed due to lack of
       forwarding tunneling support in the server's SSH daemon.
+    - Fall back to password auth if agent auth and key discovery fail.
   * /debian/rules:
     + Allow package build on systems with missing dh_python2.
   * /debian/control:
diff --git a/x2go/backends/control/_stdout.py b/x2go/backends/control/_stdout.py
index 2186b71..62104fb 100644
--- a/x2go/backends/control/_stdout.py
+++ b/x2go/backends/control/_stdout.py
@@ -774,18 +774,20 @@ class X2goControlSessionSTDOUT(paramiko.SSHClient):
         if forward_sshagent is not None:
             self.forward_sshagent = forward_sshagent
 
-        if (key_filename and os.path.exists(os.path.normpath(key_filename))) or pkey or look_for_keys or allow_agent:
+        if (key_filename and os.path.exists(os.path.normpath(key_filename))) or pkey or look_for_keys or allow_agent or (password and force_password_auth):
             try:
-                self.logger('trying SSH pub/priv key authentication with server', loglevel=log.loglevel_DEBUG)
                 if password and force_password_auth:
+                    self.logger('trying keyboard-interactive SSH authentication with server', loglevel=log.loglevel_DEBUG)
                     paramiko.SSHClient.connect(self, _hostname, port=port, username=username, pkey=None, password=password,
-                                               key_filename=None, timeout=timeout, allow_agent=False, 
+                                               key_filename=None, timeout=timeout, allow_agent=False,
                                                look_for_keys=False)
                 elif key_filename or pkey:
+                    self.logger('trying SSH pub/priv key authentication with server', loglevel=log.loglevel_DEBUG)
                     paramiko.SSHClient.connect(self, _hostname, port=port, username=username, pkey=pkey,
                                                key_filename=key_filename, timeout=timeout, allow_agent=allow_agent,
                                                look_for_keys=look_for_keys)
                 else:
+                    self.logger('trying SSH key discovery or agent authentication with server', loglevel=log.loglevel_DEBUG)
                     paramiko.SSHClient.connect(self, _hostname, port=port, username=username, pkey=None,
                                                key_filename=None, timeout=timeout, allow_agent=allow_agent,
                                                look_for_keys=look_for_keys)
@@ -795,18 +797,18 @@ class X2goControlSessionSTDOUT(paramiko.SSHClient):
                 if x2go._paramiko.PARAMIKO_FEATURE['use-compression']:
                     t.use_compression(compress=True)
 
-            except paramiko.AuthenticationException, e:
+            except (paramiko.AuthenticationException, paramiko.SSHException), e:
                 self.close()
                 if password:
                     self.logger('next auth mechanism we\'ll try is keyboard-interactive authentication', loglevel=log.loglevel_DEBUG)
                     try:
                         paramiko.SSHClient.connect(self, _hostname, port=port, username=username, password=password,
-                                                   timeout=timeout, allow_agent=False, look_for_keys=False)
+                                                   key_filename=None, pkey=None, timeout=timeout, allow_agent=False, look_for_keys=False)
                     except paramiko.AuthenticationException, e:
                         self.close()
                         if self.sshproxy_session:
                             self.sshproxy_session.stop_thread()
-                        raise e
+                        raise(e)
                     except:
                         self.close()
                         if self.sshproxy_session:


hooks/post-receive
-- 
python-x2go.git (Python X2Go Client API)

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "python-x2go.git" (Python X2Go Client API).




More information about the x2go-commits mailing list