ssh登陆超时设置

1.系统中环境变量TMOUT

  • 修改需要超时设置的用户配置文件~/.bash_profile

          添加export TMOUT=(time)(秒)

  • 修改系统配置文件/etc/profile

          添加TMOUT=(time)(秒)

       重新加载配置:source ~/.bash_profile或/etc/profile

 

2.修改ssh配置文件/etc/ssh/sshd_config

       设置变量ClientAliveInterval的值(秒)

       重启ssh服务:service sshd restart

posted on 2012-03-12 10:08  fergus.y.m  阅读(484)  评论(0)    收藏  举报