PDA

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



Kyoku
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.

bbl123
November 30th, 2012, 12:32 PM
Hi

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

chadk5utc
November 30th, 2012, 01:20 PM
heres a good reference for ssh also discusses what your attempting:
https://help.ubuntu.com/community/SSH/OpenSSH/Configuring