sshd (or global) max-connections-per-user setting under FreeBSD ?

Joe Schmoe non_secure at yahoo.com
Wed Mar 8 20:24:45 UTC 2006


I am running a stock FreeBSD 6.0-RELEASE system, with
the built-in ssh/sshd.

I am interested in limiting the number of ssh
connections any particular user can make to the system
... for instance, if limited to 3, they could login
interactively, commence an rsync over ssh, and
commence an scp file transfer, but could not initiate
a fourth ssh transaction of any sort.

I don't see an obvious way to do this, and further, I
am not particularly interested in running sshd out of
inetd, which _might_ help me accomplish this...

I am wondering the following:

- is there a general "max connections per user"
mechanism in FreeBSD that I could use ?  I only allow
ssh connections, so I don't need it to be sshd
specific - I would be happy with a global max conn
mechanism...

- (if there isn't a global maxconn) is there an
elegant way to limit max connection for sshd ?  I feel
like I could do this with pam.conf, based on the
documentation, but I don't see how, and further, there
is no pam.conf in a default install ... so perhaps I
add it to /etc/pam.d/sshd (or perhaps
/etc/pam.d/system for global ?)

I am sorry to ramble - all comments and suggestions
are greatly appreciated.

thanks.

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 


More information about the freebsd-hackers mailing list