Tighten the shell against the forkbomb

I have a server and I have to allow remote SSH to users for some purpose. I want to pull up the sheath against any bomb fork on it . How can i do this? I am awaiting a solution based on limiting the CPU usage of a specific user.

+3


source to share


1 answer


This is what you are looking for

http://linux.die.net/man/5/limits.conf

You can do something like



@remote_user            hard    cpu             50
@remote_user            hard    nproc           50

      

Thus, limiting both the CPU usage and the number of processes that can be created remote_user

.

+6


source







All Articles