jupyter-notebook设置⽀持远程访问
1.⽣成配置⽂件
jupyter notebook --generate-config
2.配置密码, 远程登录时需要输⼊
from notebook.auth import passwd passwd("mypassword")
#'sha1:67c9e60bb8b6:9ffede0825894254b2e042ea597d771089e11aed'
3.修改配置⽂件 ~/.jupyter/jupyter_notebook_config.py
c.NotebookApp.ip = '*'
c.NotebookApp.password = u'sha1:bcd259ccf...<your hashed password here>'
c.NotebookApp.open_browser = False
# It is a good idea to set a known, fixed port for server access c.NotebookApp.port = 8889
4.启动, 访问
jupyter-notebook http://IP:8889/
refernce:
本文档介绍了如何设置Jupyter Notebook以支持远程访问。首先,通过`jupyter notebook --generate-config`生成配置文件。接着,使用`notebook.auth import passwd`设置密码,并将哈希后的密码填入配置文件中。在`~/.jupyter/jupyter_notebook_config.py`中,将IP设为'*',打开浏览器选项设为False,并设定固定端口,如8889。最后,启动Jupyter Notebook并访问http://IP:8889/即可。确保网络安全并遵循最佳实践。
952

被折叠的 条评论
为什么被折叠?



