Linux log out ssh user automatically

0saves

To log out ssh user automatically add the TMOUT variable to your /etc/bashrc configuration file using your favorite editor. Mine is vim:
# vim /etc/bashrc

# Set TMOUT to 600 seconds (10 minuets):
TMOUT=300