r/IPython • u/lzcostademoraes • Aug 27 '18
Run Jupyter on SSh and turn off my local computer
I'm running a program that take hour to finish. I wanna know if it is possible to turn off my local computer and make the program still working.
On the remote I'm using this to run the Jupyter NOtebook:
user@remote $ jupyter notebook --no-browser --port=8887
And this in local:
ssh -N -L localhost:8888:localhost:8887 user@remote
I would be very happy if anyone can help me
6
Upvotes
2
u/tfsprad Aug 28 '18
Is the hour-long process running on Unix (or similar)? man nohup(1).
1
u/dansin Aug 27 '18
Thats how I do it.
3
u/mr_kitty Aug 28 '18
By default, the remote server will end your session if you disconnect. As others have said, you need to use a program like
screenon the remote server to keep your session active when you disconnect. SSH to the server, start screen and then start the Jupyter notebook server from within screen. When you disconnect, your notebook server will continue to run. Reconnect by starting the ssh tunnel again (on your local machine) and your web browser will reconnect to the remote Jupyter server.