如何连接到远程Jupyter笔记本服务器? [英] How to connect to a remote Jupyter notebook server?

查看:745
本文介绍了如何连接到远程Jupyter笔记本服务器?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在具有ssh访问权限的计算机上运行jupyter notebook服务器,并且我已经能够在本地运行笔记本.

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.

如何设置jupyter notebook,以便可以远程访问它?

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

推荐答案

如果您具有对将运行服务器的计算机的ssh访问权限,请执行以下步骤:

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

1)在要运行服务器的计算机上,执行:

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

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

2)记下的笔记本地址:将会在终端上显示给您:http://localhost:8888/?token=<A_LONG_STRING_OF_NUMBERS_AND_LETTERS>

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)在客户端计算机中,可以远程访问服务器:

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

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

4)现在,打开浏览器以使用以下地址:http://localhost:8888/?token=<THE_TOKEN>

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>

这篇关于如何连接到远程Jupyter笔记本服务器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆