怎么使用xshell配置jupyter从网页打开
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了怎么使用xshell配置jupyter从网页打开相关的知识,希望对你有一定的参考价值。
在服务器上执行:jupyter notebook --generate-config
记录下生成的配置文件位置,例如:/home/.jupyter/jupyter_notebook_config.py
打开jupyter,新建一个notebook,生成密码的sha1秘钥,代码如下:
from notebook.auth import passwd
passwd()
在文本框中输入并确认一次密码后记录sha1秘钥值,如 'sha1:XXXXXXX'
将这段值按如下格式粘贴到配置文件jupyter_notebook_config.py末尾
c.NotebookApp.password = u'sha1:XXXXXXX'
重启jupyter,重新打开网页即可 参考技术A # Set options for certfile, ip, password, and toggle off
# browser auto-opening
c.NotebookApp.certfile = u'/home/xiaolei/.jupyter/mycert.pem'
c.NotebookApp.keyfile = u'/home/xiaolei/.jupyter/mykey.key'
# Set ip to '*' to bind on all interfaces (ips) for the public server
c.NotebookApp.ip = '*'
c.NotebookApp.password = u'sha1:bcd259ccf...<你自己生成的hash密码>'
c.NotebookApp.open_browser = False
# It is a good idea to set a known, fixed port for server access
c.NotebookApp.port = 9999
以上是关于怎么使用xshell配置jupyter从网页打开的主要内容,如果未能解决你的问题,请参考以下文章