SSH tunneling (also called port forwarding) allows you to access services running on a remote machine as if they were running locally. It is widely used for Jupyter Notebook, TensorBoard, databases, and internal web services on clusters.
Assume:
8888.SSH tunneling lets you forward a local port to a remote port through an encrypted SSH connection.
From your browser point of view:
localhost:8888 <==SSH TUNNEL==> remote_server:8888
No public exposure of the remote server is needed.
-L)The most common form of SSH tunneling is local port forwarding:
ssh -L LOCAL_PORT:REMOTE_HOST:REMOTE_PORT user@remote_server
Example:
ssh -L 8888:localhost:8888 user@remote_server
Meaning:
localhost:8888 on your local machine.localhost:8888 is forwarded to localhost:8888 on remote_server.REMOTE_HOST is resolved on the remote side.-N)