How to connect to a remote Jupyter notebook server? [closed]

匆匆过客 提交于 2019-12-23 16:58:29

问题


I want to run a jupyter notebook server in a machine to which I have ssh access and that I am already able to run notebooks locally.

How can I setup the jupyter notebook so it can be accessed remotely?


回答1:


If you have ssh access to the machine that will run the server, follow the next steps:

1) In the machine that you will run the server, execute:

jupyter notebook # To start the server with the default port forwarding (8888)

2) Take note of the notebook address: that will be shown to you in the terminal: http://localhost:8888/?token=<A_LONG_STRING_OF_NUMBERS_AND_LETTERS>

3) In the client machine, with remote access to the server:

ssh -N -L localhost:8888:localhost:8888 <server_username>@<server_ip>

4) Now, open the browser to use the following address: http://localhost:8888/?token=<THE_TOKEN>


Additional info (found here): It is possible to change the port on which the server is setup

# In the server
jupyter notebook --no-browser --port=8889

# In the client
ssh -N -L localhost:8888:localhost:8889 <server_username>@<server_ip>


来源:https://stackoverflow.com/questions/49568183/how-to-connect-to-a-remote-jupyter-notebook-server

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!