sshd 侧(约 10 分钟无响应断开)
sshd 侧(约 10 分钟无响应断开)
# /etc/ssh/sshd_config
ClientAliveInterval 300
ClientAliveCountMax 2
sshd -t && systemctl reload sshdshell 侧 /etc/profile.d/timeout.sh
shell 侧 /etc/profile.d/timeout.sh
TMOUT=600
readonly TMOUT
export TMOUTClientAlive 管连接保活与超时,TMOUT 管 shell 空闲退出;审计要求操作超时退出时两者按场景组合。