I have ssh set up so my users can only access sftp and port forwarding, how can I limit the number of concurrent logins on a per user basis?
In my sshd_config I have UsePAM set to yes and in /etc/security/limits.conf I have:
username - maxlogins 1
I also tried:
username hard maxlogins 1
Neither of these works and the users can still log in multiple times.