linux系统过一两分钟就断开的时间更改

vi /etc/ssh/sshd_config
LoginGraceTime 0
参考man sshd_config
LoginGraceTime
             The server disconnects after this time if the user has not successfully logged in.  If the value is 0, there is no time limit.  The default is 120 seconds.
设置完成后重启服务reboot,或者远程执行/etc/init.d/sshd restart即可

直接执行如下命令:
#unset TMOUT
原文地址:https://www.cnblogs.com/Alysa-lrr/p/6472654.html