限定ssh登陆超时时间

ssh登陆之后,若是限定时间内没有操做侧自动断开链接
ssh

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

添加并当即生效spa

[root@zk-192.168.10.133 15:35 ~]input

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

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

[root@zk-192.168.10.133 16:05 ~]登录

# timed out waiting for input: auto-logout变量

相关文章
相关标签/搜索