How to edit and view jupyter notebooks in remote servers locally using ssh

  1. Install jupyter notebook in the remote machine:
    pip install jupyter
  2. Run jupyter notebook without opening a browser in the remote machine:
    jupyter notebook --no-browser --port=8020
  3. 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
  4. In the local machine, create a tunnel to remote port 8020
    ssh -N -f -L 8020:localhost:8020 user@remote_machine
  5. Open  http://localhost:8082/  in your browser.
  6. 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.

 

 

A world away from the world – Santorini

A world away from the world; That was Santorini to me. A place where all  our troubles and worries from our lives in the real world just.. goes away for a moment. How can one remember and dwell in the troubles from one’s life, when he is in awe of the sights that behold him? A world of white and blue, in the backdrop of the majestic ocean, calm, silent, bathed in the sun. The wind eases by your hair, touching your face, singing the song of the oceans in your ear. God, if he existed, has put quite a lot of work into this place, if you ask me. Its hard not to be spiritual when you experience Santorini.