View Full Version : [ubuntu] How do I limit concurrent sftp / port forwarding logins?

April 8th, 2012, 07:41 PM
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.

November 30th, 2012, 12:32 PM

Have you found a solution yet? If not, let me know

November 30th, 2012, 01:20 PM
heres a good reference for ssh also discusses what your attempting: