Maximum number of connections per ssh users can I have?

June 10, 2017 8.1k views
Configuration Management Ubuntu 16.04

Maximum number of connections per user connected by ssh I can have simultaneously from android devices?

1 Answer

Hi @ernestoelunico

Are you talking about maximum number of SSH shells created? The default is 10, I think, on Linux.
You can change that with MaxSessions in /etc/ssh/sshd_config.

  • Can I expand this number?

    How many does the vps allow?

    • @ernestoelunico
      Yes, you can change it. I'm not sure if Linux has a limit, but I would guess it's maximum number of open connections, which is about 65,000.
      But you would hit that limit way before, since each connection would require some amount of RAM, so your limit is probably available RAM.
      DigitalOcean doesn't impose any limits on what you do with your droplet - as long as it's legal and within the terms of agreement.

      • I want to connect multiple devices by ssh to my 1gb ram server

        is this possible?

        • @ernestoelunico
          If "multiple" is below 65,000 devices, then yes :)
          A SSH connection doesn't take that much RAM by itself, so you should be able to run quite a few connections - unless you're running other things on the server too.

Have another answer? Share your knowledge.