当前位置: > CentOS > CentOS教程 >

CentOS下限制SSH远程终端连接数

时间:2014-05-04 22:34来源:linux.it.net.cn 作者:it

方案:

1)        修改/etc/ssh/sshd_config中#MaxStartups 10:30:60,将其改为MaxStartups 1000

2)        重启SSH服务,/etc/init.d/ssh restart

Centos系统默认连接时间120秒,如果远程终端连接数过多,则会出现超时连接,解决办法如下:

1)        修改/etc/ssh/sshd_config中LoginGraceTime 120,将其改为LoginGraceTime 0,其中0表示不限制连接时间

2)        重启SSH服务,/etc/init.d/ssh restart

 

(责任编辑:IT)
------分隔线----------------------------
栏目列表
推荐内容