IPython Notebook on a remote server with tmux

I am curious. What is the issue?

  1. When you connect back, you no longer have access to the notebook OR
  2. After re-connecting, you do no see updates to the notebooks (e.g new print statements to screen)?

This is my typical workflow

  1. ssh into the box with port forwarding e.g
    ssh -i ~/.ssh/secret.pem -L 8890:localhost:8888 ubuntu@blah.com
  2. on remote box: start tmux sess
  3. within tmux sess, start notebook
  4. locally, open up browser to 8890

Afterwards, if you are disconnected (happens running after a 5 yr old :wink: more than you think!),
I have to remember to do (1) again — this is important to re-enable port forwarding again

Then, I get back my notebook (maybe have to refresh the browser). Since the actual notebook server never died on ec2, I get the notebook with any results/update while I was away

5 Likes