ssh登录以后,如果限定时间内没有操作侧自动断开连接

在 /etc/profile 文件中添加 TMOUT 变量,单位秒

添加并立即生效

[root@zk-192.168.10.133 15:35 ~]

# echo "export TMOUT=1800" >> /etc/profile && source /etc/profile

长时间不操作,这里设置的是1800秒,也就是30分钟后断开

[root@zk-192.168.10.133 16:05 ~]

# timed out waiting for input: auto-logout