- Install jupyter notebook in the remote machine:
pip install jupyter
- Run jupyter notebook without opening a browser in the remote machine:
jupyter notebook --no-browser --port=8020
- In case you are running Jupyter on a remote node (say node207 In cluster), tunnel the port to the head node, like:
ssh -N -f -L 8020:localhost:8020 node207
- In the local machine, create a tunnel to remote port 8020
ssh -N -f -L 8020:localhost:8020 user@remote_machine
- Open http://localhost:8082/ in your browser.
- Done! Go sip some tea!
Extra Remarks
I experienced an issue where I got the error “typeError: __init__() got an unexpected keyword argument ‘io_loop”. This can be solved by removing the “io_loop” argument from your “<python installation>/python2.7/site-packages/notebook/base/zmqhandlers.py” file.