How to restrict number of sftp sessions on a per user basis
Issue
- A valid user opens more and more sftp sessions, in the end the network stack overflow will kill all access to the machine, and other connections will not be accepted anymore.
MaxSessions
setting insshd_config
does not restrict number of individual sessions.maxlogins
in/etc/security/limits.conf
limits individual ssh sessions on user basis, but not number of sftp sessions on per user basis.
Environment
- Red Hat Enterprise Linux 7.x
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.