Do I really need to "exit" from an SSH session in Linux using PuTTY?

1

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?

putty_exit

bytecode77

Posted 2016-04-02T20:19:32.673

Reputation: 971

1You could press ^D instead of typing exit – Håkan Lindqvist – 2016-04-02T20:42:43.653

Good comment! Didn't know that. The question remains, though. – bytecode77 – 2016-04-02T20:43:19.780

You can easily observe what happens by having another session open, running htop or something similar. – Daniel B – 2016-04-02T20:47:34.887

Answers

1

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.

Jakuje

Posted 2016-04-02T20:19:32.673

Reputation: 7 981