title: How to limit maximum number of simultaneous logins in linux
body: <p>I need a limit (let's say to 6) how many users can be logged in my Linux (CentOS 6.3) system. Users use ssh to connect my server. Server is meant to do simulations and that's why I have need to restrict maximum number of users whom can use the server at a time, because the resources are limited.</p>
  
  <p>I tried to change sshd_config MaxSessions and MaxStartups but no cigar.</p>
  
  <p>If the sshd does not provide this kind of limitation, is there possibility to restrict maximum number of logged-in users via PAM or SELinux</p>