为Jupyter配置密码

在Python中生成密码

1
2
3
from notebook.auth import passwd
passwd('123456')
'sha1:1996ed5b2fc6:40da178c53092195aab3e1ce840e8c5c9e335fab'

修改jupyter配置文件

1
2
3
4
5
c = get_config()
c.NotebookApp.ip = ‘*’
c.NotebookApp.password = u’sha1:1996ed5b2fc6:40da178c53092195aab3e1ce840e8c5c9e335fab’
c.NotebookApp.open_browser = False
c.NotebookApp.port = 9999