解决ssh连接超时(ssh timeout)的方法

echo export TMOUT=1000000 >> /root/.bash_profile   (可设置为-1为永不超时)
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
cat /etc/ssh/sshd_config
exit

 

posted @ 2019-11-14 22:26  Chuyio  阅读(4431)  评论(0编辑  收藏  举报