首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >sftp并发连接

问sftp并发连接
EN

Server Fault用户
提问于 2012-05-25 16:38:06
回答 2查看 24.3K关注 0票数 2

我必须设置我的服务器接收20-30个使用相同用户名的不同客户端的并发sftp连接。我试过用scp测试这个模拟用户连接。

问题是,在第8次连接之后,所有其他连接都会收到暂停的通知。

( 1)在服务器上禁用任何传入连接的设置是什么;2)是否有任何iptables/网络设置可能导致这样的限制?除了所有这些传入连接之外,服务器还应该处理大约100个并发apache用户。apache端口80连接会与所有sftp上传连接发生冲突吗?

服务器是一个CentOS 5.8。

EN

回答 2

Server Fault用户

发布于 2012-05-25 17:57:51

增加MaxSessions和MaxStartups在sshd_config中的值。

超出:man sshd_config:

代码语言:javascript
复制
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).
票数 3
EN

Server Fault用户

发布于 2012-05-25 17:56:26

关于“停止的scp和sftp连接”存在好几个职位,这似乎表明scp客户端可以贪婪地使用资源和网络,只要它对其他连接产生干扰,就有一项工作--通过限制客户对带宽的“占有”来减少客户端的侵略性;

代码语言:javascript
复制
 scp -l 8192 SOURCE DESTINATION

如果该选项允许完成更多的连接,那么您将看到一个最终的解决方案来处理每个客户端的每个连接资源。(您可能想看看iptable的速率限制,或者其他一些流量整形工具.)但是首先,您应该使用该选项运行一些测试,以查看问题是否与网络资源争用直接相关。

http://www.aixmind.com/?p=1371

票数 1
EN
页面原文内容由Server Fault提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://serverfault.com/questions/392749

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档