If I ssh a Linux server, start some processes, and the connection drops, what will happen?

3

If I putty a Linux server, and doing some processes (For example, copying files), and when the connection drop, what will happen? Will the copying files continue or it is interrupted?

Ted Wong

Posted 2013-04-11T06:19:02.417

Reputation: 903

Question was closed 2013-04-12T11:15:58.500

Answers

6

If you ssh to a linux server and the connection drops then the process you were running will get a signal to stop. (Usually signal SIGHUP, from the old time you connected via a modem and it hung up).

That means the processes will stop.
(In the same way as things will stop on windows when you log out)

If you do not want them to stop then you can:

  1. Tell the process to ignore the hangup signal.
    Example nohup make bzimage &
  2. Or run the command in screen and detach screen.
  3. Or run the command in tmux.

Hennes

Posted 2013-04-11T06:19:02.417

Reputation: 60 739