{ } Raw JSON

bundles / jupyter_client 8.10.0 / jupyter_client / ssh / tunnel / tunnel_connection

function

jupyter_client.ssh.tunnel:tunnel_connection

source: /jupyter_client/ssh/tunnel.py:130

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) → int

Summary

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