Linux – SSH Connection Limitations

linuxnetworkingssh

I have a network of 100 machines, all with ubuntu Linux.

Is there a limit to the number of machines that can connect to one single machine (at the same time)?

For example, can I have 99 of my machines maintain continuous ssh connection to the 100th machine? Can I have every one of my machines (every one of the 100) maintain a continuous ssh connection to all other 99 machines?

How much memory does each such a connection take?

Best Answer

  • The number of total connections is limited mostly by the number of ports they can come in on, and the capability of the system. There are configuration options (Max_Sessions and Max_Startup) but they only apply to the number of connections FROM a single IP, and the number of concurrent requested startup connections...Basically they're DDOS protection.

    There is no easy way to tell how much memory a connection is going to use: it is entirely dependent on the amount of traffic. One extremely heavily utilized connection can use more resources than 10,000 connections that are doing nothing.

    All that being said, it's almost always going to be a better idea to have the connections established when they're needed, and closed when they're not.

  • Related Question