本地连接云端notebook

在本地连接云端服务器的notebook看起来是一件相当炫酷的事情。不觉得这很酷吗?作为一名理工男我觉得这太酷了,很符合我对未来生活的想象,科技并带着趣味。

  • 先使用ssh连接到云端。
  • 使用jupyter notebook –no-browser打开jupyter。记下带token的url。
  • ssh -N -f -L localhost:8888:localhost:8888 your_name@your_ip。
  • 打开带token的url即可。

conda可能没有你想要的环境(比如python2)。需要

1
2
conda install -c conda-forge ipykernel
python -m ipykernel install --user --name=firstEnv