[IPython-dev] Remote connection to IPython kernel
Thu Oct 20 15:06:03 CDT 2011
On Thu, Oct 20, 2011 at 12:35, Pablo Winant <email@example.com> wrote:
> Hi all,
> I am trying to run an Ipython server on a distant machine with SSH
> (preferably the notebook) but I couldn't figure out how to do. So far, I
> have tried two approaches:
> - run a webnotebook on the server, listening on 127.0.0.1:8888, tunnel
> the port to my machine mymachine:9999 and access it with my local browser.
> With this setup, I can see a list of notebooks and can apparently edit them
> but no cell is evaluated. It looks very strange to me as the notebook works
> correctly if I use a browser running on the server. Is it a websocket
> problem (both browsers are recent enough)
This, I think, is a bug. The websockets are created on the original addr (
127.0.0.1:888) as resolved by the browser, so if you tunnel the connection
to a different port, the websocket connections never establish. I can
reproduce this failure tunnelling 8888 to 9999, and it works tunneling 8888
> - try to adapt the follow the instructions given in the doc for the
> connection over ssh. However, when I run the kernel on the server, it
> doesn't print the list of ports anymore but gives the name of a json file. I
> understand this is the new system to store connection informations but I
> don't know how to use it over the network. I tried --existing
> --ssh=myserver but it doesn't work (yet ?).
The notebook does not handle kernels over ssh, only the qtconsole.
> Is there currently a way to run a kernel over ssh ? I understand the target
> is moving quite fast and I am following the progress with great interest.
(assuming git master)
If you start a kernel on one machine, it creates a connection file in the
security directory. Send that file to the client from which you want to
connect (or if you are already connected locally, view its contents with
`%connect_info`, and use `ipython qtconsole --existing
/path/to/kernel-foo.json --ssh myserver`.
It is no longer possible to just copy/paste ports, because that had security
issues. Files, at least, can be made private.
> Best regards,
> IPython-dev mailing list
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the IPython-dev