Redhat 8 Kills Tmux Session Upon Ssh Timeout
Issue
I am working on a Red Hat Enterprise Linux (RHEL) 8 machine with the DISA STIG applied via OpenSCAP. The STIG requires that users be automatically dropped into a tmux session, that tmux session locks the screen after a set idle time, and SSH disconnects after another amount of idle time.
The problem I’m having is that we have long running commands that we start and then walk away from. First tmux locks the screen, and eventually SSH kills the connection. The expected behavior is that when we reconnect via SSH either the old tmux session is reconnected or a new tmux session is created while the old one is still running in the background. Either way we don’t want the tmux session to die when SSH disconnects.
Fix
Edit /etc/systemd/logind.conf and change KillUserProcesses=yes
to no
- https://serverfault.com/questions/1156544/stigd-redhat-8-kills-tmux-session-upon-ssh-timeout