I'm used to type exit in PuTTY, when leaving the SSH shell. However, you can also just close the terminal.

Unless there is still a task running, does this have any consequences, such as leftover files, processes or anything else?

PuTTY warns you, but is this just a confirmation, or should I really care to properly exit a session?


  • 1
    You could press ^D instead of typing exit – Håkan Lindqvist Apr 2 '16 at 20:42
  • Good comment! Didn't know that. The question remains, though. – bytecode77 Apr 2 '16 at 20:43
  • You can easily observe what happens by having another session open, running htop or something similar. – Daniel B Apr 2 '16 at 20:47

does this have any consequences

If the client is written correct way, it should take care of shutting down the connection to server and the server should take care of closing your session, whatever method you use.

Even if you would close the connection wrong way, wouldn't send exit to the server, the TCP connection would time out eventually (5 minutes or so) and the server will take care of the "hanging" session.

It is nothing to worry.

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.