Remote access virtual machines jupyter notebook

Jupyter configuration on the server, telnet to help us.

Step 1: Install jupyter, pip3 install jupyter (used here python3)

Second step: generating a configuration file jupyter notebook --generate-config

gz@ubuntu:~$ cd .jupyter/
gz@ubuntu:~/.jupyter$ ll
total 12
drwxr-xr-x  2 gz gz 4096 Sep  3 14:56 ./
drwxr-xr-x 36 gz gz 4096 Sep  4 11:28 ../
-rw-r--r--  1 gz gz   26 Sep  3 14:56 migrated
gz@ubuntu:~/.jupyter$ jupyter notebook --generate-config
jupyter: command not found
gz@ubuntu:~/.jupyter$ workon py3_face
(py3_face) gz@ubuntu:~/.jupyter$ jupyter notebook --generate-config
Writing default config to: /home/gz/.jupyter/jupyter_notebook_config.py
(py3_face) gz@ubuntu:~/.jupyter$ ll
total 48
drwxr-xr-x  2 gz gz  4096 Sep  4 11:35 ./
drwxr-xr-x 36 gz gz  4096 Sep  4 11:28 ../
-rw-rw-r--  1 gz gz 33341 Sep  4 11:35 jupyter_notebook_config.py
-rw-r--r--  1 gz gz    26 Sep  3 14:56 migrated
(py3_face) gz@ubuntu:~/.jupyter$ 

The third step: generating a key opening python3

>>> from notebook.auth import passwd
>>> passwd()
Enter password: 
Verify password: 
'sha1:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
>>> 

Modify the configuration file

vim + ~/.jupyter/jupyter_notebook_config.py

Adding content is as follows:

c.NotebookApp.ip="192.168.xxx.xxx"
c.NotebookApp.password = u"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"   # 刚才复制的那个密文
c.NotebookApp.open_brower = False # # 禁止自动打开浏览器
c.NotebookApp.port = 8888 #随便指定一个端口

Note here: c.NotebookApp.ip = '104.222.1.1', where you should fill in ip server, all online are c.NotebookApp.ip = '*', I stepped on a lot of shining test pit.

Physical machine to open the browser
input
http://192.168.xxx.xxx:8888/

Enter the password previously set.

Guess you like

Origin www.cnblogs.com/linusgau/p/11458183.html