# Timeout ssh and console logins after X mins



## Just_Johnny (Aug 11, 2009)

Would I need a shell script for this?


----------



## SirDice (Aug 11, 2009)

No script required you just need to edit a few configs. 
For the Bourne shells (sh and bash) just set TMOUT to the number of seconds: *TMOUT=3600; export TMOUT*. 
The (t)csh need *set autologout 5* (for 5 minutes).

Edit /etc/profile for (ba)sh. And /etc/csh.cshrc for (t)csh.


----------

