How to open a connection to a remote IPython instance

First, from your computer, open an ssh connection to the server:

$ ssh [username@]

On the server, start an IPython notebook:

$ ipython notebook --no-browser &

Note the port that IPython is running on. IPython will print out a few lines. One of them should look like:

[I 10:24:23.092 NotebookApp] The IPython Notebook is running at: http://localhost:8888/

In this example, IPython is running on port 8888.

To view IPython notebook in your browser, forward this port to the port IPython is running on on the server. You can do this with ssh:

$ ssh -N -L 8888:localhost:8888 [username@]

To connect to the IPython notebook that's running on the server, point your browser to http://localhost:8888.