How to restrict number of sftp sessions on a per user basis

Solution Unverified - Updated -

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 in sshd_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.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content