在服务器上执行:

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'
c.NotebookApp.ip = '0.0.0.0'

重启jupyter,重新打开网页即可

results matching ""

    No results matching ""