Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Remote access Jupyter notebook from Windows?

I usually access Jupyter notebook running on Linux from Mac OS X via port forwarding like following:

https://coderwall.com/p/ohk6cg/remote-access-to-ipython-notebooks-via-ssh

Is it possible to do similar thing from Windows 10 instead of Mac OS? I guess putty or WSL offer one.

https://www.akadia.com/services/ssh_putty.html https://superuser.com/questions/1119946/windows-subsystem-for-linux-ssh-port-forwarding

like image 451
Light Yagmi Avatar asked Sep 18 '17 10:09

Light Yagmi


1 Answers

You can create an SSH tunnel to connect to the Jupyter Notebook or Jupyter Lab web interface using PUTTY on windows.

  1. Download the latest version of PUTTY
  2. Open PUTTY and enter the server URL or IP address as the hostname
  3. Now, go to SSH on the bottom of the left pane to expand the menu and then click on Tunnels
  4. 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.
  5. Click the Open button to connect to the server via SSH and tunnel to the desired ports.
  6. In the PUTTY terminal, run Jupyter, where the default port is 8888
    • jupyter lab --no-browser or jupyter-notebook --no-browser
  7. Copy the server path into the browser on your local system and navigate to the notebook
    • http://localhost:8888/lab?token=... or http://127.0.0.1:8888/lab?token=...

Note:

  • If running remotely to your employer, a VPN connection will probably be required.
like image 174
Kraten Avatar answered Sep 19 '22 07:09

Kraten