在本地机器上远程访问Jupyter Notebook

我的个人博客:https://lixiaohui.live
来源:https://hsaghir.github.io/data_science/jupyter-notebook-on-a-remote-machine-linux/
1 - Open an SSH tunnel that forwards the port setup for Jupyter Notebook on the remote machine to a port on the local machine so that we can access it using our local browser

hamid@local_host$ ssh user@remote_host
user@remote_host$ jupyter notebook --no-browser --port=8889

This runs a jupyter notebook server on the remote machine on port:8889 without opening a browser since we will use the browser on our local machine to connect to this.

2- In a new terminal window on your local machine, SSH into the remote machine again using the following options to setup port forwarding.

hamid@local_host$ ssh -N -L localhost:8888:localhost:8889 user@remote_host

-N options tells SSH that no commands will be run and it’s useful for port forwarding, and -L lists the port forwarding configuration that we setup.

3- Access the remote jupyter server via your local browser. Open your browser and go to:

localhost:8888

To close the SSH tunnel simply do ctrl-c.

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

  • rljs by sennchi Timeline of History Part One The Cognitiv...
    sennchi阅读 12,163评论 0 10
  • NAME dnsmasq - A lightweight DHCP and caching DNS server....
    ximitc阅读 7,949评论 0 0
  • 有时候突然觉得想通了释然了 有时候又想不通了 每天就这样无限循环 我开始计划一个人度过余生。 明明知道绝无可能,有...
    格格西阅读 2,767评论 0 0
  • 现在网络文学如此泛滥,能让我完整读完一遍的东西已不多。象《天行健》这样读了两遍、部分章节达到三、四遍的,可说绝无仅...
    德万托阿阅读 6,780评论 2 5
  • 2012年,我们相遇在那个夏末 懵懂的我们,渐渐熟识 人说,前世五百次的回眸,换来今世的擦肩而过 那我们的前世又会...
    不灬良人阅读 2,817评论 5 0