[IPython-User] Remote access to ipython notebook server with ssh multi hop

Jimmie Yoo jimmie.yoo@chaj....
Mon Aug 5 16:01:56 CDT 2013


Should be http://localhost:8888 no?


On Mon, Aug 5, 2013 at 4:48 PM, George Nurser <gnurser@gmail.com> wrote:

> Hi Jimmie,
> Thanks for responding, and sorry it's taken me so long to get back to this.
>
> I've tried what you suggest, except I just use the standard
> ~/.ssh/id_rsa.
>
> If I do ssh -L 8888:localhost:8888 ipy_host &
> then the browser hangs when I load https://localhost:8888/ (I need to do
> https as the notebook is password-protected).
>
> If I miss out the &, at least I get an ERR_SSL_PROTOCOL_ERROR, but still
> no joy.
>
> cheers, George Nurser
>
>
> On 19 May 2013 17:50, Jimmie Yoo <jimmie.yoo@chaj.com> wrote:
>
>> Repeat post:
>>
>> I had to do something like this recently and one of the simplest ways
>> that I've found is to modify your ssh config file as follows:
>>
>> [user@mylaptop ~/]# cat .ssh/rsg_config
>> # Host is whatever friendly name you want to use for the ipython_host
>> Host ipy_host
>>
>>   # ipython_host ssh username
>>   User         ipython_user
>>
>>   # Actual ipython hostname
>>   HostName     ipython.bla.local
>>
>>   # Path to your private key file if you're using one and only needs
>>   # to be defined if you're not using the default one (~/.ssh/id_rsa)
>>   # This will come into play when connecting to the gateway
>>   IdentityFile ~/.ssh/ipython_id_rsa
>>
>>   # This is the command that will be invoked on the gateway host after
>>   # you connect. As you can see it simply executes an nc (netcat) which
>> just
>>   # echoes all of your traffic to the ipython_host
>>   # %h is the 'HostName' defined above
>>   # %p is the port which defaults to 22
>>   ProxyCommand ssh -q -i ~/.ssh/ipython_id_rsa
>> gatewayuser@gateway.bla.local nc %h %p 2>/dev/null
>>
>> You should then in theory be able to access the ipython notebook instance
>> on your laptop by running:
>>
>> ssh -L 8888:localhost:8888 ipy_host &
>> (& will background)
>>
>> and then you should be able to hit the site in your browser on
>> http://localhost:8888/
>>
>> Lemme know if this works or if you have any questions. If this does work
>> perhaps we should post this somewhere.
>>
>>
>> Jim
>>
>> On Sunday, May 19, 2013 at 5:51 AM, George Nurser wrote:
>>
>> Hi,
>> My work computers are accessed externally by ssh'ing onto a gateway
>> computer and then from that onto the particular machine I am using.
>>
>> So to enable direct ssh'ing into say bigserver, in my .ssh/config I have:
>>
>> Host bigserver
>>   ProxyCommand ssh -q gateway.com nc bigserver 22
>>
>> Is there any way that I can externally access an ipython notebook running
>> on bigserver?
>>
>> The instructions  (for normal single-hop ssh to a server server.com) on
>>
>> http://wisdomthroughknowledge.blogspot.co.uk/2012/07/accessing-ipython-notebook-remotely.html
>> suggest the key step is to issue on the local machine the command
>>
>> ssh -N -f -L localhost:6000:localhost:7000 username@server.com
>>
>> so that the ipython server can be found on http://localhost:6000.
>>
>> Has anybody any ideas on how I could change the above ssh command and/or
>> the .ssh/config to work with multihop ssh? Not surprisingly, there is no
>> success with the straightforward command above, i.e
>>
>> ssh -N -f -L localhost:6000:localhost:7000 username@bigserver
>>
>> Many thanks, George Nurser.
>>
>>
>>
>>
>> _______________________________________________
>> IPython-User mailing list
>> IPython-User@scipy.org
>> http://mail.scipy.org/mailman/listinfo/ipython-user
>>
>>
>>
>> _______________________________________________
>> IPython-User mailing list
>> IPython-User@scipy.org
>> http://mail.scipy.org/mailman/listinfo/ipython-user
>>
>>
>
> _______________________________________________
> 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/20130805/a40909d8/attachment-0001.html 


More information about the IPython-User mailing list