I connect to a remote server using ssh -L
but if I close the laptop lid or the connection is lost, the jupyter notebook is disconnected.
After I reconnect to the remote server, the "last" session is lost.
What can be done to make it persistent?
Could screen
help with it?
On the remote server, you should open your jupyter in a screen
session, it will make it persistent if you lose the connection to the server and resume it.
ssh -L xxxx:localhost:yyyy server
.screen
.jupyter notebook --no-browser --port=yyyy
.localhost:xxxx
.To disconnect manually and reconnect:
control + a
and then d
.control + d
ssh -L xxxx:localhost:yyyy
.screen -r
.localhost:xxxx
.