How do I limit concurrent sftp / port forwarding logins
        Posted  
        
            by 
                Kyoku
            
        on Server Fault
        
        See other posts from Server Fault
        
            or by Kyoku
        
        
        
        Published on 2012-04-08T18:12:38Z
        Indexed on 
            2012/04/08
            23:33 UTC
        
        
        Read the original article
        Hit count: 327
        
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.
© Server Fault or respective owner