|
View:
New views
12 Messages
—
Rating Filter:
Alert me
|
|
|
Limit number of login sessionsHi I'm looking for a way to configure a limit for the maximum number of
simultaneous login sessions for a user. I want to do this for preventing users to create multiple ssh sessions. I think something similar can be done trough pf, but that's not the approach I'm looking for. |
|
|
Re: Limit number of login sessionsjust curious why the pf solution would not work for you?
On Sun, Sep 21, 2008 at 2:16 AM, Maximo Pech <makzpj@...> wrote: > Hi I'm looking for a way to configure a limit for the maximum number of > simultaneous login sessions for a user. I want to do this for preventing > users to create multiple ssh sessions. I think something similar can be done > trough pf, but that's not the approach I'm looking for. |
|
|
Re: Limit number of login sessionsOn Sunday 21 September 2008 02:16:58 Maximo Pech wrote:
> Hi I'm looking for a way to configure a limit for the maximum number of > simultaneous login sessions for a user. I want to do this for preventing > users to create multiple ssh sessions. I think something similar can be > done trough pf, but that's not the approach I'm looking for. Hi how about the sessionlimit in login.conf? Haven't ever used it myself but sounds quite promising. |
|
|
|
|
|
|
|
|
Re: Limit number of login sessionsOn 24.09-09:48, Maximo Pech wrote:
> Well I guess I will have to resolve this by coding something. What do you > think about this: [ ... ] would you not be better to use ALTQ to limit the bandwidth available to each user? then if they share their password their only sharing their own use? if not then i'd suggest you create a BSD auth module for processing the login sessions and add a 'login-max' capability. |
|
|
Re: Limit number of login sessionsOn Wed, Sep 24, 2008 at 10:48 AM, Maximo Pech <makzpj@...> wrote:
> 2008/9/22 Maximo Pech <makzpj@...> > >> This will be a ssh tunnel, I want to share it with a few friends, but I >> don't want them sharing it with someone else because if a lot of people >> start using it my upload bandwidth will suffer. It's very easy for them >> giving away their user/password to someone else, then those give the >> password to someone else... suddenly you have 20 ssh connections when you >> intended to have only 5. Some friends you have... ps aux | grep sshd | grep priv | awk '{print $12}' | sort | uniq -c Tell your friends if their number ever gets bigger than 2, they're no longer your friends. A few more minutes of scripting and you'll have something to run in cron that deletes their account. |
|
|
Re: Limit number of login sessions> would you not be better to use ALTQ to limit the bandwidth available
> to each user? then if they share their password their only sharing > their own use? Users are not in my local network. They will connect from the internet and they have dynamic IPs so I guess that wouldn't work because altq can limit bandwidth based on IP address, not on user names. > > > if not then i'd suggest you create a BSD auth module for processing > the login sessions and add a 'login-max' capability. > What kind of module? a kernel module? |
|
|
Re: Limit number of login sessions> Some friends you have...
> > ps aux | grep sshd | grep priv | awk '{print $12}' | sort | uniq -c > > Tell your friends if their number ever gets bigger than 2, they're no > longer your friends. A few more minutes of scripting and you'll have > something to run in cron that deletes their account. That one sounds good. |
|
|
|
|
|
Re: Limit number of login sessionsMaximo Pech schrieb:
>> would you not be better to use ALTQ to limit the bandwidth available >> to each user? then if they share their password their only sharing >> their own use? > > > Users are not in my local network. They will connect from the internet and > they have dynamic IPs so I guess that wouldn't work because altq can limit > bandwidth based on IP address, not on user names. from pf.conf(5): user <user> This rule only applies to packets of sockets owned by the specified user. For outgoing connections initiated from the firewall, this is the user that opened the connection. For incoming connections to the firewall itself, this is the user that listens on the destination port. For forwarded connections, where the firewall is not a connection endpoint, the user and group are unknown. don't know if that could be useful for your purpose, but it sounds a nice feature. you should be able assign the queues based on the user. regards, julian > > >> >> if not then i'd suggest you create a BSD auth module for processing >> the login sessions and add a 'login-max' capability. >> > > What kind of module? a kernel module? |
|
|
Re: Limit number of login sessionsMaximo Pech escreveu:
> I mean, I don't know if there's another way to do it without having to login > in the ssh server. > What about a VPN? You can filter on vpn ip's. -- Giancarlo Razzolini http://lock.razzolini.adm.br Linux User 172199 Red Hat Certified Engineer no:804006389722501 Verify:https://www.redhat.com/certification/rhce/current/ Moleque Sem Conteudo Numero #002 OpenBSD Stable Ubuntu 8.04 Hardy Heron 4386 2A6F FFD4 4D5F 5842 6EA0 7ABE BBAB 9C0E 6B85 |
| Free embeddable forum powered by Nabble | Forum Help |