bundles / jupyter_client latest / jupyter_client / ssh / tunnel / tunnel_connection
function
jupyter_client.ssh.tunnel:tunnel_connection
Signature
def tunnel_connection(socket: socket.socket, addr: str, server: str, keyfile: str | None = None, password: str | None = None, paramiko: Any = None, timeout: int = 60) → intSummary
Connect a socket to an address via an ssh tunnel.
Extended Summary
This is a wrapper for socket.connect(addr), when addr is not accessible from the local machine. It simply creates an ssh tunnel using the remaining args, and calls socket.connect('tcp://localhost:lport') where lport is the randomly selected local port of the tunnel.
Aliases
jupyter_client.ssh.tunnel_connection