Putty 连接centOS7 超时问题
方法1:
#vim /etc/ssh/sshd_config(添加或修改以下配置)
方法2:
SRE实战 互联网时代守护先锋,助力企业售后服务体系运筹帷幄!一键直达领取阿里云限量特价优惠。#echo export TMOUT=1000000 >> /root/.bash_profile (设置环境变量为1000000,用户没有操作时,超过该秒断开SSH会话)
#cat /root/.bash_profile (打印查看是否写入)
#source .bash_profile
#cp /etc/ssh/sshd_config /etc/ssh/sshd_config_bak
#echo ClientAliveInterval=60 >> /etc/ssh/sshd_config
#service sshd restart (重启SSH服务)
#cat /etc/ssh/sshd_config
#exit
方法3:
export timeout = -1
每次上线需要设置一次,这个方法不写配置表。
相关:
无法重启ssd 服务时,使用以下指令查询错误。
/usr/sbin/sshd -T
比如查询到2个错误:

更多精彩