LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Returning to an SSH connection. (https://www.linuxquestions.org/questions/linux-general-1/returning-to-an-ssh-connection-4175459241/)

dragonfly-uk 04-23-2013 03:34 AM

Returning to an SSH connection.
 
Can anybody tell me is there a way that I can open an SSH connection, set of a task that is going to take several hours to run, close the connection.

Some time later, or even from a difference workstation, reconnect to the same SSH connection, and check the progress of the job I fired off??

evo2 04-23-2013 03:43 AM

Hi,

screen and tmux can be used for this. Basically you ssh to the remote machine, start a tmux or screen session, start yout program/task, then "detach" from screen or tmux. At this point you can either reattach to screen or tmux, or log out, and ssh back in later and reattach.

If your requirements are more basic and/or screen or tmux are not available, nohup may be enough. using nohup will ensure that even if your ssh connection is lost you program will continue to run.

I can't recommend any particular tutorial on these tools, but there are certainly many available on the web.

HTH,

Evo2.

dragonfly-uk 04-23-2013 04:28 AM

Thanks, had a quick look at Screen looks like it does what I want. Thanks for the help.

evo2 04-23-2013 05:51 PM

Hi,
Quote:

Originally Posted by dragonfly-uk (Post 4937055)
Thanks, had a quick look at Screen looks like it does what I want. Thanks for the help.

No problem. BTW, I was a happy screen user for many years, then I found tmux: now I'm a very happy tmux user.

Evo2.


All times are GMT -5. The time now is 05:03 AM.