This is all it takes to set up auto-logout for users regardless of ssh or console, but it's pretty easy to bypass or ignore.
cat << 'EOT' > /etc/profile.d/log-out.sh #!/bin/bash # Log out in 30 minutes for root, 60 for # other users, if the session is idle if [ `id -nu` == "root" ];then export TMOUT=1800 readonly TMOUT else export TMOUT=3600 readonly TMOUT fi EOT chmod a+x /etc/profile.d/log-out.sh