Welcome to Server Circle. It's a friendly site and all levels of experience are welcome. Be aware that we use cookies for your login.
Server Circle - Ask questions about Servers and get answers from experts.
Beta (0.21 sec)
Dropping users on the SSH Server on Centos

How can I automatically kick SSH users off my server after they've been idle and doing nothing for a while ?

Some seem to leave the window open forever.
Asked by:
TomPating
1355 points
 Report Abuse
 Share Page - Category: CentOS Linux - Tags: Dropping users on the SSH Server on Centos
 Enter your response
Please use Pastie.org to paste lengthy code or to fix formatting issues with code
  • Responses in reverse (1)

Best Answer

Assuming the users have bash for their shell you could set $TMOUT to log them out after X seconds idle.

http://tldp.org/LDP/abs/html/internalvariables.html

If the $TMOUT environmental variable is set to a non-zero value time, then the shell prompt will time out after $time seconds. This will cause a logout.

Response by:
_SteveWilson ...
4290 points


  • Related Questions
About Us : Contact Us : Etiquette : Terms : CDN Failover : ShorterURL : CDN Fallback : © 2013 Server Circle