(host, user, private_key, remote_port)
Open a SSH connection with a TCP tunnel proxy.
Open a SSH connection with a TCP tunnel proxy.
Open a SSH connection with a TCP tunnel proxy .
def tcp_tunnel(host, user, private_key, remote_port):
    """Open a SSH connection with a TCP tunnel proxy."""
    set_up = TCPTunnelUp(host, user, private_key, remote_port)
    tear_down = KillProcess('tcp_tunnel', PID_FILE)

    with environment_run(up=set_up, down=tear_down) as result:
        yield result
def tcp_tunnel ( host , user , private_key , remote_port ) : set_up = TCPTunnelUp ( host , user , private_key , remote_port ) tear_down = KillProcess ( 'tcp_tunnel' , PID_FILE ) with environment_run ( up = set_up , down = tear_down ) as result : yield result