Increase the maximum number of simultaneous users to log in to linux server using ssh.

February 4, 2016 by Linux Guru

Filed under AWS, Linux

Last modified July 15, 2016

Increase the maximum number of simultaneous users to log in to linux server using ssh

Need to change default values in sshd_conf file. Need root access
before change

# /usr/sbin/sshd -T | grep -i max
maxauthtries 6
maxsessions 10
clientalivecountmax 3
maxstartups 10:30:100

updating sshd_conf file
#vi /etc/ssh/sshd_config
MaxSessions 50
maxstartups 50

reloading sshd service
#service sshd reload; After changing values recheck

#/usr/sbin/sshd -T | grep -i max
maxauthtries 6
maxsessions 50
clientalivecountmax 3
maxstartups 50:30:50

Note:- If you want to limit the number of concurrent logins a user can have over ssh, you can adjust limits.conf

/etc/security/limits.conf:
batch-user           –       maxlogins       50

Leave a Comment