ssh终端自动logout或自动退出,以及不能用root直接登录的问题

来源:互联网 发布:国家安全网络宣传周 编辑:程序博客网 时间:2024/04/28 08:08

chmod +w /etc/ssh/sshd_config

vi /etc/ssh/sshd_config

如果没有ClientAliveCountMax项,则添加ClientAliveCountMax,如果有,则将它的值改成较大的值;例如,ClientAliveInterval设成默认的300(每5分钟向客户端发一次心跳),然后将ClientAliveCountMax设成2880(最多尝试2880次,即10天),保存,退出

chmod -w /etc/ssh/sshd_config

service sshd restart


原创粉丝点击