alan9101 发表于 2012-03-10 10:05

如何限制ssh用户同时登陆的数量

如何限制ssh用户同时登陆的数量?

修改了/etc/ssh/sshd_config下的
MaxStartups 2
没有作用

修改了/etc/security/limits.conf 这个文件
@ssh      -       maxlogins       4
并修改了/etc/pam.d/sshd这个文件中的
session    required   pam_limits.so
没有作用

小弟用的是Description:    Red Hat Enterprise Linux Server release 5.5 (Tikanga)
请各位大神出来帮忙解决

zhaoxin_hope 发表于 2012-03-29 13:55

我也遇到了同样的问题   正在研究   

dengbao2001 发表于 2012-03-29 14:07

本帖最后由 dengbao2001 于 2012-03-29 14:34 编辑

/etc/ssh/sshd_config

sshd reads configuration data from /etc/ssh/sshd_config (or the file
   specified with -f on the command line).The file contains keyword-argu-
   ment pairs, one per line.Lines starting with `#' and empty lines are
   interpreted as comments.Arguments may optionally be enclosed in double
   quotes (") in order to represent arguments containing spaces.

   The possible keywords and their meanings are as follows (note that key-
   words are case-insensitive and arguments are case-sensitive):

MaxSessions
             Specifies the maximum number of open sessions permitted per net-
             work connection.The default is 10.

此参数现在每台电脑的最大会话数

zhaoxin_hope 发表于 2012-03-29 14:20

楼上的   还是不太明白    能 否详细点说的????

alan9101 发表于 2012-03-29 20:03

同求,挂了好多天了,还没有人回答呢

algol 发表于 2012-03-29 21:04

修改/etc/ssh/sshd_config配置文件
将"MaxSessions 10"改为适当的值。
页: [1]
查看完整版本: 如何限制ssh用户同时登陆的数量