Remote connection to a Jupyter Notebook (Lab) server
Source: Running a Jupyter notebook from a remote server
Assuming you are on LOCAL computer, have ssh access to the REMOTE computer and want to open a Jupyter server there:
1
ssh to REMOTE and run the Jupyter server without opening the browser (choose for example port 8889, don’t use 8888 since it’s the default one and it may be already running another server on it):
# On REMOTE
jupyter lab –no-browser –port 8889
2
From the LOCAL create a ssh tunnel linking local port 8889 to remote port 8889 (username and IP address of the remote, the prompt will stay unresponsive)
# On LOCAL
ssh -N -L localhost:8889:localhost:8889 username@REMOTE
3
On LOCAL open a browser page to localhost:8889 (you will be asked the alphanumeric token that you can read when launching the Jupyter server)