Killing Idle session

does any one know how to kill an idle session?
I want to kill any idle sessions after 30 min... Local or remote....
i want to do this without a script or TCP wrappers...i want to know if there is a file that i can configure.....

ThAnks:rolleyes:

By session, I take it you mean a normal login session through the likes of ssh or telnet?...

Luckily this can all be done through environment variables... For example:

To kill the session after 15 minutes idle...

For CSH and TCSH:
# set auto_logout=15

For BASH:
# set TMOUT=900

These wait for N secs/mins after issuing the primary prompt before terminating the session.

Put those in your .cshrc, .bashrc or /etc/profile

Hope that helps... :slight_smile:

thanks ajg,
but when you set this variable, does it end the session automatically after 15 min? or is it 15 min. after the session has been idle?:confused:

it's 15 mins after the session has been idle.

thanx but...this prameter only works for ROOT and not regular users. i have trired putting this prameter in .profile of the user, in the /etc/default/login, in the /etc/default/telnetd for telnet sessions and none of them have been successful...:confused: :frowning: