远程remote 01——Ubuntu由ssh远程访问jupyter notebook

Ubuntu配置

  • Ubuntu由ssh远程访问jupyter notebook
    • 1. Jupyter-notebook configuration file
    • 2. Generate password
    • 3. Modify configuration file
    • 4. Launch jupyter-notebook
    • 5. Remote login
    • 6. Problem

Ubuntu由ssh远程访问jupyter notebook

1. Jupyter-notebook configuration file

jupyter notebook --generate-config

Note: 会有以下配置文件生成的提醒:
Writing default config to: /home/computer_name/.jupyter/jupyter_notebook_config.

2. Generate password

使用python,远程电脑里有ipython可以直接输入ipython

$ python
from notebook.auth import passwd
passwd()
# 输入完后会出现以下输入密码,该密码为远程登录jupyter密码
Enter password:******
Verify password:******
# 下面为配置文件的密文
输出为: 'sha1:cd723d3e4b0afg34hasrsf65yr453t32***************'

3. Modify configuration file

用vim或者gedit, 修改第一步生成的配置文件:

vim ~/.jupyter/jupyter_notebook_config.py

修改如下:

# *号表示任何的IP地址都可以访问
c.NotebookApp.ip= '*'                                                             #204 line
# 前面第一步生成的密文

你可能感兴趣的:(Remote,ubuntu,远程,ssh)