Remote access Jupyter notebook from Windows?
You can create an SSH tunnel to connect to the Jupyter Notebook or Jupyter Lab web interface using PUTTY on windows.
- Download the latest version of PUTTY
- Open PUTTY and enter the server URL or IP address as the hostname
- Now, go to SSH on the bottom of the left pane to expand the menu and then click on Tunnels
- Enter the port number which you want to use to access Jupyter on your local machine. Choose 8000 or greater (i.e. 8001, 8002, etc.) to avoid ports used by other services, and set the destination as
localhost:8888
where:8888
is the number of the port that Jupyter Notebook is running on. Now click the Add button, and the ports should appear in the Forwarded ports list. - Click the Open button to connect to the server via SSH and tunnel to the desired ports.
- In the PUTTY terminal, run Jupyter, where the default port is 8888
jupyter lab --no-browser
orjupyter-notebook --no-browser
- Copy the server path into the browser on your local system and navigate to the notebook
http://localhost:8888/lab?token=...
orhttp://127.0.0.1:8888/lab?token=...
Note:
- If running remotely to your employer, a VPN connection will probably be required.
As an addendum to this answer, this screenshot shows how putty config looks like:
On the Linux machine, I then start Jupyter with:
jupyter notebook --no-browser --port=8889
Finally, on the windows (or any remote machine) I enter localhost:8888
in the browser.
It asks for the token, that is provided at the shell of the Linux machine.
--
Note which port refers to which machine, I have the notebook on port 8889, the browser calls it at localhost:8888