原理为:服务器对xshell开放端口,xshell转发该端口到本地监听端口,本地通过localhost:监听端口访问服务器上的jupyter
在jupyter_notebook_config.py中,根据网上的博客添加这几行代码,端口可以不一样
之后在终端中运行jupyter notebook --no-browser --allow-root --ip=0.0.0.0 --port=8899
在xshell中将8899转发至本地的9123端口
此处类型应选择拔出而非传入
在浏览器把访问localhost:9123