Skip to content

Commit

Permalink
Stop using direct socket connection to test ssh connection - breaks w…
Browse files Browse the repository at this point in the history
…hen using a bastion
  • Loading branch information
James Portman committed Mar 5, 2018
1 parent aea7abc commit 601138e
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions lib/ansible/plugins/connection/ssh.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,13 +139,6 @@ def __init__(self, *args, **kwargs):
def _connect(self):
return self

def transport_test(self, connect_timeout):
''' Test the transport mechanism, if available '''
port = int(self.port or 22)
display.vvv("attempting transport test to %s:%s" % (self.host, port))
sock = socket.create_connection((self.host, port), connect_timeout)
sock.close()

@staticmethod
def _create_control_path(host, port, user):
'''Make a hash for the controlpath based on con attributes'''
Expand Down

0 comments on commit 601138e

Please sign in to comment.