我必须设置我的服务器接收20-30个使用相同用户名的不同客户端的并发sftp连接。我试过用scp测试这个模拟用户连接。
问题是,在第8次连接之后,所有其他连接都会收到暂停的通知。
( 1)在服务器上禁用任何传入连接的设置是什么;2)是否有任何iptables/网络设置可能导致这样的限制?除了所有这些传入连接之外,服务器还应该处理大约100个并发apache用户。apache端口80连接会与所有sftp上传连接发生冲突吗?
服务器是一个CentOS 5.8。
发布于 2012-05-25 17:57:51
增加MaxSessions和MaxStartups在sshd_config中的值。
超出:man sshd_config:
MaxSessions
Specifies the maximum number of open sessions permitted per net-
work connection. The default is 10.
MaxStartups
Specifies the maximum number of concurrent unauthenticated con-
nections to the SSH daemon. Additional connections will be
dropped until authentication succeeds or the LoginGraceTime
expires for a connection. The default is 10.
Alternatively, random early drop can be enabled by specifying the
three colon separated values ``start:rate:full'' (e.g.
"10:30:60"). sshd(8) will refuse connection attempts with a
probability of ``rate/100'' (30%) if there are currently
``start'' (10) unauthenticated connections. The probability
increases linearly and all connection attempts are refused if the
number of unauthenticated connections reaches ``full'' (60).发布于 2012-05-25 17:56:26
关于“停止的scp和sftp连接”存在好几个职位,这似乎表明scp客户端可以贪婪地使用资源和网络,只要它对其他连接产生干扰,就有一项工作--通过限制客户对带宽的“占有”来减少客户端的侵略性;
scp -l 8192 SOURCE DESTINATION如果该选项允许完成更多的连接,那么您将看到一个最终的解决方案来处理每个客户端的每个连接资源。(您可能想看看iptable的速率限制,或者其他一些流量整形工具.)但是首先,您应该使用该选项运行一些测试,以查看问题是否与网络资源争用直接相关。
https://serverfault.com/questions/392749
复制相似问题