Server Fault is a question and answer site for system and network administrators. 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

If I don't exit out of SSH, what happens? Do the sessions build up over time? Is it a security risk?

share|improve this question
up vote 2 down vote accepted

If you have a firewall in front of your host which "expires" old sessions, you won't be logged in very log after leaving it idle (unless of course you use ServerAliveInterval setting of SSH).

SSH does consume additional resources for every connection you make, albeit very little. The security risk is introduced if your system which you left the connection open on is compromised (either remotely or locally at the keyboard). You'll already be authenticated and logged in, which defies any security measures SSH provides in the first place. If you don't really need to keep your sessions open, it's best to close them.

share|improve this answer

This depends a lot on the configuration of the SSH server - many servers are configured by the admin to time out a session after a given period of time, and most will drop sessions that have been terminated from the client-side even if you don't exit.

The users command on most (all?) linux distros will tell you if you're logged in more than once.

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.