0

I'm currently upgrading my Ubuntu server from 14.04 to 14.10, and I'm curious about something. If my SSH session gets disconnected during either this or any other long-running command, reopening the SSH terminal will simply give me a new, blank prompt where I can enter new commands.

So I guess I have two questions:

  1. If the SSH session is disconnected while a command is running, is the command terminated or does it run to completion in the background?
  2. If it runs to completion after the SSH session is disconnected, is it possible to open a new SSH session and resume that command's output in the new terminal window?
3

If you disconnect, everything stops. What you want to do is to ssh into the remote box and use a program like screen or tmux so you can reconnect. That way, you could for instance ssh into something from work use screen and do your thing, disconnect and go home, get home and realize you forgot to arm the missles or whatever then ssh from home and pick up where you left off.

Screen Tutorial

Another Screen Tutorial

  • That looks perfect and answers both of my questions. Thank you, I appreciate it! – vaindil Oct 30 '14 at 17:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.