Ubuntu上操作:
1. jupyter notebook --generate-config
2. 生成密碼

生成密碼
3.vi /【路徑】/.jupyter/jupyter_notebook_config.py
修改四項(xiàng)
c.NotebookApp.ip = '*'
c.NotebookApp.password = u'sha1:bcd259ccf...<your hashed password here>'
c.NotebookApp.open_browser = False
c.NotebookApp.port = 9999
#端口號(hào)隨意
4. 啟動(dòng)
jupyter notebook
Win上操作:
瀏覽器輸入 ip:端口號(hào) 訪問
如192.168.1.1:8899
如果直接輸入無法連接,則需要利用ssh進(jìn)行連接:
1. 安裝OpenSSH組件


2. 打開cmd

3. 輸入ssh -N -f -L localhost:8888:localhost:8889 remote_user@remote_host
前面是win,后面是linux,看情況改端口號(hào)
remote_user@remote_host改成自己的用戶名和服務(wù)器IP地址

4.?打開瀏覽器,輸入地址:http://localhost:8888/
參考:
https://jupyter-notebook.readthedocs.io/en/latest/public_server.html#notebook-public-server
https://zhuanlan.zhihu.com/p/33420241
https://www.bilibili.com/read/cv1420735/