Re: [BSD6] SSH Restriction

From: Ed Schouten <ed_at_80386.nl>
Date: Fri, 1 Aug 2008 14:10:04 +0200
Hello Karim,

* karim.bourenane_at_orange-ftgroup.com <karim.bourenane_at_orange-ftgroup.com> wrote:
> I have one question. How i can restrict ( limit ) 1 user to have for
> exemple 5 ssh connection in simutanous time, no more ?

It's quite funny you ask this question, because I've been working on
this last week.

The new TTY code, which I'll commit next week, adds a new rlimit to the
kernel called RLIMIT_NPTS. This rlimit allows you to limit the number of
pseudo-terminals allocated by a single user. This means you can limit
the number of login sessions by tuning the "pseudoterminals" field in
/etc/login.conf.

This seems to work with tools like screen(1), xterm(1), etc.
Unfortunately I didn't get it working with OpenSSH, because OpenSSH
allocates terminals while been root. I've already contacted the OpenSSH
folks about this, but I haven't got any response (yet).

-- 
 Ed Schouten <ed_at_80386.nl>
 WWW: http://80386.nl/

Received on Fri Aug 01 2008 - 10:10:05 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:33 UTC