[IPython-User] Tunnelling ipython notebook through gateway server
MinRK
benjaminrk@gmail....
Thu Feb 21 12:15:46 CST 2013
On Thu, Feb 21, 2013 at 3:16 AM, Jose Gomez-Dans <jgomezdans@gmail.com>wrote:
> Hi,
>
> I have access to a cluster where I can run ipython. I would like to tunnel
> the notebook port so I can access it from my computer, but I have only seem
> how to do that for machines that are single hop.
> My setup is as follows:
>
> laptop -----SSH-----> gateway -----SSH-----> ipython_host
>
> So I would need to map port 7000 (eg) on ipython_host through to the
> gateway and back to laptop. It's fairly straightforward to tunneling
> between laptop and gateway, but I can't run ipython there.
>
> Does anyone have any suggesting, or I should just desist?
>
Is the ipython_host visible to the gateway directly, or do you really need
two *ssh* hops?
If ipython_host is directly visible from gateway, then it's pretty easy (I
do this regularly):
[laptop] $> ssh gateway -f -N -L 7000:ipython_host:7000
But if you want to tunnel to a tunnel, then it's a bit more convoluted. I
just tried this, and it worked for me:
[laptop] $> ssh gateway -f -L 7000:127.0.0.1:7001 "ssh ipython_host -N -L
7001:127.0.0.1:7000"
Theoretically, you could continue this indefinitely, chaining tunnels by
specifying the command for each tunnel to open the next one.
-MinRK
>
> Thanks!
> Jose
>
> _______________________________________________
> IPython-User mailing list
> IPython-User@scipy.org
> http://mail.scipy.org/mailman/listinfo/ipython-user
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/ipython-user/attachments/20130221/5cae8213/attachment.html
More information about the IPython-User
mailing list