1: 在远程服务器上,启动jupyter notebook服务:
jupyter notebook --no-browser --port=8889
2: 在本地Terminal中启动SSH:
ssh -N -f -L localhost:8888:localhost:8889 remote_user@remote_host
其中: -N 告诉SSH没有命令要被远程执行; -f 告诉SSH在后台执行; -L 是指定port forwarding的配置,远端端口是8889,本地的端口号的8888。remote_user@remote_host 用实际的远程帐户和远程地址替换,@不变
3: 打开浏览器,输入地址:http://localhost:8888/ ,输入token即可使用
引自 https://blog.youkuaiyun.com/patrick75/article/details/51473884