bundles / jupyter_client 8.10.0 / jupyter_client / connect / tunnel_to_kernel
function
jupyter_client.connect:tunnel_to_kernel
source: /jupyter_client/connect.py:270
Signature
def tunnel_to_kernel(connection_info: str | KernelConnectionInfo, sshserver: str, sshkey: str | None = None) → tuple[Any, ...]Summary
tunnel connections to a kernel via ssh
Extended Summary
This will open five SSH tunnels from localhost on this machine to the ports associated with the kernel. They can be either direct localhost-localhost tunnels, or if an intermediate server is necessary, the kernel must be listening on a public IP.
Parameters
connection_info: dict or str (path)Either a connection dict, or the path to a JSON connection file
sshserver: strThe ssh sever to use to tunnel to the kernel. Can be a full
user@server:portstring. ssh config aliases are respected.sshkey: str [optional]Path to file containing ssh key to use for authentication. Only necessary if your ssh config does not already associate a keyfile with the host.
Returns
(shell, iopub, stdin, hb, control): intsThe five ports on localhost that have been forwarded to the kernel.
Aliases
jupyter_client.tunnel_to_kernel