Remotely Accessing Jupyter Notebooks

Last updated:

SSH to the instance and start Jupyter

On the remote machine do:

use nohup at the beginning and & at the end to stop the server from being killed if you log out

$ nohup jupyter notebook --no-browser --port=8888 &

Set up an SSH tunnel

On your local machine do:

This example uses key-based authentication (the -i flag)

$ ssh -i ~/.ssh/my-private-key.pem -N -f -L localhost:8889:localhost:8888 my-user-name@my-remote-server

Open the local url

If you used the example line above to set up the tunnel, you need to open your browser at http://localhost:8889.

jupyter notebook Enter the Token that was output on the log
when you started Jupyter on the remote server

After inserting your token, you should be able to use Jupyter:

jupyter-noteboo-remote Great Success!


Dialogue & Discussion