简体   繁体   English

通过SSH隧道从远程位置连接ipython-notebook

[英]Connect ipython-notebook via SSH tunnel from a remote location

I'm trying to open an ipython-notebook (which is running on a server) on a macbook from a remote location through an ssh tunnel but no data received. 我正在尝试通过ssh隧道从远程位置在macbook上打开ipython-notebook(在服务器上运行),但没有收到数据。 This is the command for the SSH tunnel 这是SSH隧道的命令

ssh -L 5558:localhost:5558 -N -t -x  user@remote-host

and this is the command I used to lunch the notebook form the server 这是我用来在服务器上吃午餐的命令

ipython notebook --pylab=inline --port=5558 --ip=* --no-browser --notebook-dir notebooks

Than I tried to open it on a new tab with this remote-host:5558 but no data received. 比我尝试使用此remote-host:5558在新选项卡上打开它,但没有收到数据。 Thanks in advance! 提前致谢!

The directive -L AAAA:somehost:BBBB will cause SSH to listen on port AAAA on localhost (the machine the ssh command is run on) and forward any connection to that port, over the SSH session, to the host somehost port BBBB. 指令-L AAAA:somehost:BBBB将使SSH侦听localhost (运行ssh命令的计算机)上的端口AAAA,并通过SSH会话将与该端口的任何连接转发到主机somehost端口BBBB。 So, you need to open http://localhost:5558/ in the browser on the machine you run the ssh command on. 因此,您需要在运行ssh命令的计算机上的浏览器中打开http://localhost:5558/

Read this: How do I add a kernel on a remote machine in IPython (Jupyter) Notebook? 请阅读以下内容: 如何在IPython(Jupyter)Notebook中的远程计算机上添加内核?

Remote jupyter kernel/kernels administration utility (the rk) here: https://github.com/korniichuk/rk 远程Jupyter内核/内核管理实用程序(RK)在这里: https : //github.com/korniichuk/rk

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM