加密jupyter notebook server

前言

特定情况下需要对notebook server进行加密,加密方法很简单,我们编辑一下jupyter_notebook_config.py即可。

最简单的方法

此方法只在notebook5.0版本以上可用

  1. 打开cmd/bash,键入
    jupyter notebook password
    
  2. 输入并确认你的密码即可

笨方法

  1. 找到jupyter_notebook_config.py位置

    Windows: C:\Users\USERNAME.jupyter\jupyter_notebook_config.py

    OS X: /Users/USERNAME/.jupyter/jupyter_notebook_config.py

    Linux: /home/USERNAME/.jupyter/jupyter_notebook_config.py

  2. 可能没有此文件,此时需要我们手动生成,bash/cmd输入

    jupyter notebook --generate-config
    
  3. 手动jupyter_notebook_config.py里面的密码

猜你喜欢

转载自blog.csdn.net/qq_34769162/article/details/107947827