Remote access Jupyter notebook from Windows?

2020-05-16 06:02发布

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

4条回答
ら.Afraid
2楼-- · 2020-05-16 06:04

Follow the steps below.

step1- Download putty.
step2- Insert ip address or hostname.
step3- Go to SSH and expand.
step4- Add address of jupyter-notebook to destination column ex: localhost:6666. Add local port such as 8000 to source and press add button. Then connect, it should work.

查看更多
ら.Afraid
3楼-- · 2020-05-16 06:11

As an addendum, this screenshot shows how putty config looks like:putty for remote jupyter notebook configuration

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.

Done.

--

Note, for saknes of clarity which port refers to which machine, I have the notebook on port 8889, the browser calls it at localhost:8888

查看更多
再贱就再见
4楼-- · 2020-05-16 06:28

I solved this problem by myself. My solution is using Windows Subsystem for Linux (WSL). This offers (virtual?) Linux console like Ubuntu. I just use ssh with -L option on it.

查看更多
家丑人穷心不美
5楼-- · 2020-05-16 06:30

Yes, you can create an SSH tunnel to connect to the Jupyter Notebook web interface using PUTTY on windows. Before proceeding, make sure that the Jupyter Notebook instance is up and running on the server. Just follow the below instructions:

  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 (ie 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. Finally, click the Open button to connect to the server via SSH and tunnel the desired ports. Navigate to http://localhost:8000 (or whatever port you chose) in a web browser to connect to Jupyter Notebook running on the server.
查看更多
登录 后发表回答