sftp最大连接数设置MaxSessions

修改sshd_config增加MaxSessions的值

vi /etc/ssh/sshd_config
#修改增加MaxSessions的值o
MaxSessions 50

参数说明

/etc/ssh/sshd_config有两个参数可以控制:
MaxSessions:每个TCP连接允许的(多路复用)打开会话的最大数量。
MaxStartups:与SSH守护进程并发的未经身份验证的连接的最大数量。

最大会话数
指定每个网络连接允许的最大打开shell、登录或子系统(例如sftp)会话数。支持连接多路复用的客户端可以建立多个会话。将MaxSessions设置为1将有效地禁用会话多路复用,而将其设置为0将阻止所有shell、登录和子系统会话,同时仍允许转发。默认值为10。

MaxSessions最大会话数
	Specifies the maximum number of open shell, login or subsystem (e.g. sftp) sessions permitted per network connection. Multiple sessions may be established by clients that support connection multiplexing. Setting MaxSessions to 1 will effectively disable session multiplexing, whereas setting it to 0 will prevent all shell, login and subsystem sessions while still permitting for-warding. 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:30:100.  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). 
最大启动次数
指定到SSH守护程序的**未经身份验证的并发连接的最大数量。**在身份验证成功或连接的LoginTraceTime过期之前,将删除其他连接。默认值为10:30:100。或者,可以通过指定三个冒号分隔的值“开始:速率:满”(例如“10:30:60”)来启用随机提前丢弃。如果当前存在“启动”(10)个未经验证的连接,sshd(8)将以“速率/100”(30%)的概率拒绝连接尝试。如果未经身份验证的连接数达到“满”(60),则概率线性增加,并且拒绝所有连接尝试。

参考

[1]http://cn.voidcc.com/question/p-hvxovvyi-bkv.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值