0

I am connected to a remote computer by using ssh connection. I am using jupyter notebook to train a neural network model. The process will take days to finish. I want to keep the process running even after I am disconnected. I know that tmux and screen can do that for me but i have a problem

so the way i connect is from windows

ssh Ipaddress

Then I connect to the Jupyter notebook. This gives me a URL address to open the notebook.This is happening in a single command prompt.

Now the problem is that i have to write this line,in a separate command prompt.

ssh -NL portnumber:localhost:portnumber host@IP

And when I turn my computer off this connection is cut which makes the process stop running.Is there a work around with this

user123
  • 101
  • 1
    You need something like screen (apt install screen). A session manager, that will held the session, even if the connection is lost. Start your connection, type 'screen' ... play around ... disconnect your session, reconnect and reattach with screen -x. You'll get the console as you left it - There are other, like tmux, byobu, mtm ... But I don't know them well. Just use what feels good to you. – LupusE Mar 28 '22 at 11:16
  • 1
  • @ArturMeinild i already saw that question my problem is i have to run two ssh as you can see in my question – user123 Mar 28 '22 at 14:30
  • Please clarify which machines are involved, what is running where, the exact sequence of commands you use to set it all up, which machine you want to turn off and what you want to continue running. Keep in mind that nothing can run on a turned off machine. – Tilman Mar 31 '22 at 21:34

0 Answers0