def tunnel_connection(socket, addr, server, keyfile=None, password=None, paramiko=None, timeout=60):
 (new_url, tunnel) = open_tunnel(addr, server, keyfile=keyfile, password=password, paramiko=paramiko, timeout=timeout)
 socket.connect(new_url)
 return tunnel

def tunnel_connection ( socket , addr , server , keyfile = None , password = None , paramiko = None , timeout = 60 ) : ( new_url , tunnel ) = open_tunnel ( addr , server , keyfile = keyfile , password = password , paramiko = paramiko , timeout = timeout ) socket . connect ( new_url ) return tunnel
connect a socket to an address via an ssh tunnel .