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...