def _ssh_forward_accept(ssh_session, timeout_ms):
    """Waiting for an incoming connection from a reverse forwarded port. Note
    that this results in a kernel block until a connection is received.
    """

    ssh_channel = c_ssh_forward_accept(c_void_p(ssh_session), 
                                       c_int(timeout_ms))

    if ssh_channel is None:
        raise SshTimeoutException()

    return ssh_channel
Waiting for an incoming connection from a reverse forwarded port. Note
    that this results in a kernel block until a connection is received.