summaryrefslogtreecommitdiff
path: root/paramiko/client.py
diff options
context:
space:
mode:
authorJeff Forcier <jeff@bitprophet.org>2017-09-13 08:52:27 -0700
committerJeff Forcier <jeff@bitprophet.org>2017-09-13 08:52:27 -0700
commit1217df3c80a43384a647158a9eefc1d7bcc25f82 (patch)
tree268b8ebefaa165bc45eb73debeccb732e43d4a06 /paramiko/client.py
parent01cfbbe9f37ed214c4093e1a6a1a865290cc7cb4 (diff)
downloadparamiko-1217df3c80a43384a647158a9eefc1d7bcc25f82.tar.gz
Feels like we do still want set_gss_host gated by whether GSS is in play (as is in master)
Diffstat (limited to 'paramiko/client.py')
-rw-r--r--paramiko/client.py11
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: