diff options
author | Jeff Forcier <jeff@bitprophet.org> | 2017-09-13 08:52:27 -0700 |
---|---|---|
committer | Jeff Forcier <jeff@bitprophet.org> | 2017-09-13 08:52:27 -0700 |
commit | 1217df3c80a43384a647158a9eefc1d7bcc25f82 (patch) | |
tree | 268b8ebefaa165bc45eb73debeccb732e43d4a06 | |
parent | 01cfbbe9f37ed214c4093e1a6a1a865290cc7cb4 (diff) |
Feels like we do still want set_gss_host gated by whether GSS is in play (as is in master)
-rw-r--r-- | paramiko/client.py | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/paramiko/client.py b/paramiko/client.py index 0e556608..e9099851 100644 --- a/paramiko/client.py +++ b/paramiko/client.py @@ -350,11 +350,12 @@ class SSHClient (ClosingContextManager): t = self._transport = Transport( sock, gss_kex=gss_kex, gss_deleg_creds=gss_deleg_creds) t.use_compression(compress=compress) - if gss_host is None: - t.set_gss_host(hostname, gss_trust_dns) - elif gss_host is not None: - # Don't canonicalize gss_host - t.set_gss_host(gss_host, False) + if gss_kex: + if gss_host is None: + t.set_gss_host(hostname, gss_trust_dns) + elif gss_host is not None: + # Don't canonicalize gss_host + t.set_gss_host(gss_host, False) if self._log_channel is not None: t.set_log_channel(self._log_channel) if banner_timeout is not None: |