Auto logout user (TTY PTS) after a period of inactivity
Ability to terminate interactive sessions after a period of inactivity and allows users to terminate their own authenticated session.
TMOUT variable to a number in seconds you wish for bash/shell to wait before automatically logging out the shell if no command is run.
For example 10 min
vyos@r14:~$ sudo cat /etc/profile.d/autologout.sh #!/usr/bin/env bash TMOUT=600 readonly TMOUT export TMOUT vyos@r14:~$
After 10 min
vyos@r14:~$ timed out waiting for input: auto-logout Connection to 192.168.122.14 closed. $
Proposed CLI
set system login autologout 300