【发布时间】:2019-08-07 13:25:42
【问题描述】:
我想通过 SSH 隧道访问一个 jupyter notebook 并遵循这个秘诀
https://hsaghir.github.io/data_science/jupyter-notebook-on-a-remote-machine-linux/
总结 - : 1.登录远程机器
user@local_host$ ssh user@remote_host
remote_user@remote_host$ jupyter notebook --no-browser --port=8889
2.在新终端中:
user@local_host$ ssh -N -L localhost:8888:localhost:8889 remote_user@remote_host
3.然后转到浏览器并转到
localhost:8888
现在这是我的问题: 我只能分两步访问远程机器
ssh -X username@server
ssh -KX my_pc_name
并且 jupyter notebook 只安装在 my_pc_name 上。
当我用更长的登录过程替换第一步的第一行时,我为第二步写什么?
当我插入时 remote_user = username 和 remote_user = my_pc_name,我从 jupyter 笔记本中收到一个安全错误,要求提供令牌。我从第一步获得的令牌,运行 jupyter notebook 将不起作用。
一种解决方案是将两个 ssh 登录步骤合二为一。
【问题讨论】:
标签: python-3.x ssh jupyter-notebook