« Return to Thread: Limit number of login sessions

Re: Limit number of login sessions

by Ted Unangst-2 :: Rate this Message:

Reply to Author | View in Thread

On 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.

 « Return to Thread: Limit number of login sessions