我想通过网络浏览器远程访问笔记本电脑服务器,following 显示我是如何设置我的笔记本电脑服务器的:
$jupyter-notebook --generate-config
$ cd ~/.jupyter
2.使用以下命令创建SSL证书(Linux和Windows).
req -x509 -nodes -days 365 -newkey rsa:1024 -keyout mycert.pem -out mycert.pem
3.编辑配置文件的配置文件,即生成密码的jupyter_notebook_config.py ..
c = get_config()
# You must give the path to the certificate file.
c.NotebookApp.certfile = u'/home/azureuser/.jupyter/mycert.pem'
# Create your own password as indicated above
c.NotebookApp.password = u'sha1:b86e933199ad:a02e9592e5 etc... '
# Network and browser details. We use a fixed port (9999) so it matches
# our Azure setup,where we've allowed :wqtraffic on that port
c.NotebookApp.ip = '*'
c.NotebookApp.port = 9999
c.NotebookApp.open_browser = False
4.start $jupyter-notebook服务器
您现在应该可以在地址https://[PUBLIC-IP-ADDRESS]:9999访问您的Jupyter笔记本.
启动笔记本:
$ ~ jupyter-notebook
[I 16:46:58.627 NotebookApp] Serving notebooks from local directory: /home/user
[I 16:46:58.627 NotebookApp] 0 active kernels
[I 16:46:58.627 NotebookApp] The Jupyter Notebook is running at: https://SERVER_IP:9999/
[I 16:46:58.627 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
但是,当我在https://MY_SERVER_IP:9999打开我的浏览器(在我家,笔记本服务器在我的实验室)时,页面无法打开. Chrome浏览器返回:
ERR_ADDRESS_UNREACHABLE
我该怎么办?
最佳答案
您遵循的那些说明有点过时:
原文链接:https://www.f2er.com/python/438516.html> Anaconda版本为4.
> Jupyter预装了新款Anaconda
> Jupyter默认为端口“8888”
>您应该提及如何进行配置的修改.我最终进入纳米去做.
>你不能用conda使用“sudo”.
如果你想在VPS上从头开始安装Ipython笔记本,并通过ssh访问它,我在这里写了一个更新的教程:
在服务器上使用命令行安装和运行Ipython Notebook之后,您可以使用Putty(在Windows上)使用SSH隧道连接到笔记本,或者在类Unix系统(即Mac和Linux)上使用ssh -L命令连接到笔记本