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

George Nurser gnurser@gmail....
Fri Aug 30 15:47:08 CDT 2013


Hi Jimmie and Vasco,
Tried it without the ssl certification, and it works fine.

I guess you're right that the ssl isn't necessary, though it does give a
slightly alarming message:
2013-08-30 21:39:23.568 [NotebookApp] CRITICAL | WARNING: The notebook
server is listening on all IP addresses and not using encryption. This is
not recommended.

Thanks very much for your help. George.


On 13 August 2013 13:02, Vasco Tenner <vasco@tenner.nl> wrote:

> Hi George,
>
> On 08/05/2013 10:48 PM, George Nurser wrote:
> > then the browser hangs when I load https://localhost:8888/ (I need to do
> > https as the notebook is password-protected).
> In principle the https part is not necessary as the connection is
> encrypted via ssh (unless you're afraid of sniffing on your local
> computer or the ipython server).
>
> Vasco
>
> >
> > 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
> > <mailto: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_rsagatewayuser@gateway.bla.local
> >     <mailto: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 <http://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 <http://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
> >>     <mailto: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 <mailto:IPython-User@scipy.org>
> >>     http://mail.scipy.org/mailman/listinfo/ipython-user
> >
> >
> >     _______________________________________________
> >     IPython-User mailing list
> >     IPython-User@scipy.org <mailto: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/20130830/35142b4a/attachment.html 


More information about the IPython-User mailing list