Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

This happened many times.

While the SSH active, I'm so tired and just close the terminal without exit

Is it dangerous to doing like that?

share|improve this question
Simply hit Ctrl+D twice instead of Alt-F4 or Ctrl-Q, this sends the exit signal to your current ssh, then to your shell, and the terminal emulator should close automatically without shell. Problem solved. – Profpatsch Mar 15 '13 at 11:00
@Profpatsch: unless, of course, you use IGNOREEOF (in bash) because you also use a terminal multiplexer and got tired of sometimes mistyping ^a d as ^d, thereby quitting unintentionally. – 0xC0000022L Mar 15 '13 at 13:02
up vote 24 down vote accepted

Not at all. When the terminal process exits, the client processes within will also die, and when this happens, the connection to the remote server will be closed by the operating system. The server will see the connection close, and terminate the processes on the server.

However, it is possible that you might end up with lingering processes on the server if they were backgrounded and ignore certain signals.

share|improve this answer

When we closes the terminal directly, It generates a SIGHUP signal. This signal kills all the tasks/processes under the terminal automatically/instantly. So no problem occurring.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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