Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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

2 Answers 2

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

 
discard

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.