jupyter notebook --no-browser --port=8888
复制远程终端显示的 token
序列
ssh -L 8888:localhost:8888 <REMOTE_USER>@<REMOTE_HOST>
e.g.
ssh -L 8888:localhost:8888 zhangsan@xx.xx.xx.xx -p 10001
-p
用来指定远程服务器用户的端口。
(1) 在本地浏览器访问jupyter notebook
http://localhost:8888/?token=xxxxxxx
?token=
后面替换成你之前复制的token序列。
(2) 在pycharm中配置jupyter server
点击Configure Jupyter Server...
在Configured Server
处填入http://localhost:8888/?token=xxxx
同样的,在?token=
后面添加之前复制的token
序列。配置完成以后就可以使用pycharm远程访问jupyter notebook了。
参考:
[1]: https://stackoverflow.com/questions/69244218/how-to-run-a-jupyter-notebook-through-a-remote-server-on-local-machine