背景叙述
已有环境:linux服务器,miniconda,python3
参考文章
https://www.cnblogs.com/thousfeet/p/10647102.html
过程
1.安装jupyter
conda install jupyter
2.生成配置文件
jupyter notebook --generate-config
3.配置密码
jupyter notebook password
4.配置SSL
由于期间我由于SSL ERROR无法连接,所以并没有配置,可能会产生安全问题
5.写入配置文件
jupyter-notebook-config.py中修改
# Set options for certfile, ip, password, and toggle off
# browser auto-opening
c.NotebookApp.certfile = u'/absolute/path/to/your/certificate/mycert.pem' #i delete this line and the next line
c.NotebookApp.keyfile = u'/absolute/path/to/your/certificate/mykey.key'
# Set ip to '*' to bind on all interfaces (ips) for the public server
c.NotebookApp.ip = '*'
c.NotebookApp.password = u'sha1:bcd259ccf...<your hashed password here>'
c.NotebookApp.open_browser = False
# It is a good idea to set a known, fixed port for server access
c.NotebookApp.port = 8890
最后在本机浏览器进行端口映射就可以
ssh -L 1234:xx.xx.xx.xx:8890 username@xx.xx.xx.xx -fN
本地浏览器键入
http://127.0.0.1:1234就好了嘎嘎嘎