I have an issue when running a jupyter notebook on a remote server. My current setup is this:
I would ssh into the remote server and run tmux
, then jupyter notebook --no-browser --port=xxxx
. On my local machine, I would then run ssh -L yyyy:localhost:xxxx user@server.domain
. Then I would navigate to localhost:yyyy
and run my jupyter notebook there.
This is all good until the ssh connection hangs or breaks. Then, when I reconnect the ssh pipe via ssh -L yyyy:localhost:xxxx user@server.domain
again, I can see the same notebook, but I cannot see any of the outputs from cells that should be there when I was disconnected. The notebook would also not be executing code, although the notebook would still be running in the background as a process on the server.
My question would be what's the method to make a jupyter notebook remotely accessible where all the code blocks would continue to run and provide output even if the remote connection drops. And how to see all those outputs once the remote connection resumes.