How do I limit concurrent session on a per user basis for ssh?

Solution 1:

It appears to me, from the MAN page for pam_limits (at least on rhel/centos), that adding a maxlogins parameter for the desired user(s) would do the trick... but I haven't tested it:

NAME
       pam_limits - PAM module to limit resources

SYNOPSIS
       pam_limits.so [change_uid] [conf=/path/to/limits.conf] [debug] [utmp_early] [noaudit]

DESCRIPTION
       The pam_limits PAM module sets limits on the system resources that can be obtained in a user-session. Users of uid=0 are affected by this limits, too.

       By default limits are taken from the /etc/security/limits.conf config file. Then individual *.conf files from the /etc/security/limits.d/ directory are read.