(remote_machine, remote_port, service = VoidService, config = {})
return Connection(service, Channel(stream), config = config)
Connects to an RPyC server over an SSH tunnel (created by plumbum).
    See `Plumbum tunneling <http://plumbum.readthedocs.org/en/latest/remote.html#tunneling>`_ 
    for further details.
    
    .. note::
       This function attempts to allocate a free TCP port for the underlying tunnel, but doing
       so is inherently prone to a race condition with other processes who might bind the 
       same port before sshd does. Albeit unlikely, there is no sure way around it.

    :param remote_machine: an :class:`plumbum.remote.RemoteMachine` instance
    :param remote_port: the port of the remote server
    :param service: the local service to expose (defaults to Void)
    :param config: configuration dict

    :returns: an RPyC connection
Connects to an RPyC server over an SSH tunnel (created by plumbum).
    See `Plumbum tunneling <http://plumbum.readthedocs.org/en/latest/remote.html#tunneling>`_ 
    for further details.
    
    .. note::
       This function attempts to allocate a free TCP port for the underlying tunnel, but doing
       so is inherently prone to a race condition with other processes who might bind the 
       same port before sshd does. Albeit unlikely, there is no sure way around it.
Connects to an RPyC server over an SSH tunnel ( created by plumbum ) . See Plumbum tunneling <http : // plumbum . readthedocs . org / en / latest / remote . html#tunneling > _ for further details . .. note :: This function attempts to allocate a free TCP port for the underlying tunnel but doing so is inherently prone to a race condition with other processes who might bind the same port before sshd does . Albeit unlikely there is no sure way around it .
def ssh_connect(remote_machine, remote_port, service = VoidService, config = {}):
    """
    Connects to an RPyC server over an SSH tunnel (created by plumbum).
    See `Plumbum tunneling <http://plumbum.readthedocs.org/en/latest/remote.html#tunneling>`_ 
    for further details.
    
    .. note::
       This function attempts to allocate a free TCP port for the underlying tunnel, but doing
       so is inherently prone to a race condition with other processes who might bind the 
       same port before sshd does. Albeit unlikely, there is no sure way around it.

    :param remote_machine: an :class:`plumbum.remote.RemoteMachine` instance
    :param remote_port: the port of the remote server
    :param service: the local service to expose (defaults to Void)
    :param config: configuration dict

    :returns: an RPyC connection
    """
    with _ssh_connect_lock:
        loc_port = _get_free_port()
        tun = remote_machine.tunnel(loc_port, remote_port)
        stream = TunneledSocketStream.connect("localhost", loc_port)
        stream.tun = tun
    return Connection(service, Channel(stream), config = config)
def ssh_connect ( remote_machine , remote_port , service = VoidService , config = { } ) : with _ssh_connect_lock : loc_port = _get_free_port ( ) tun = remote_machine . tunnel ( loc_port , remote_port ) stream = TunneledSocketStream . connect ( "localhost" , loc_port ) stream . tun = tun return Connection ( service , Channel ( stream ) , config = config )