I will try to be very specific to the question, please pardon my language if not clear.

Say i have a Unix system 'A', from where I want to ssh into some other servers in parallel and do some task. How will I know how many parallel ssh are allowed on 'A' server ?


For your particular case, it depends on some factors (Hardware and OS).
You have to check the limits set on your machine (you didn't say anything about the architecture).
Try to check ulimit -a and take a look, for example, at limits about open files parameter (it is even relative to the number of open sockets).
These are limits set for user; you can take a look at /proc/sys/fs/file-max (if you're on an Ubuntu machine) to look at system-wide setting about that parameter.

Other than limits set into the system and limits of your hardware (RAM saturation, etc.), there's no explicit limitation set by SSH Client (as I know).

If you configure limits that you need on your client machine, but you cannot have more SSH connections to the same Server, try to customize followind parameter on the server side sshd,

You can customize the parallel sessions allowed from inside your configuration file /etc/ssh/sshd_config, using as much sessions as you need.

The following parameter should do the trick:

Specifies the maximum number of open shell, login or subsystem (e.g. sftp) sessions permitted per network connection. Multiple sessions may be established by clients that support connection multiplexing. Setting MaxSessions to 1 will effectively disable session multiplexing, whereas setting it to 0 will prevent all shell, login and subsystem sessions while still permitting for- warding. The default is 10.

  • 2
    Isn't the question about SSH client sessions? – aventurin Oct 4 '16 at 18:53
  • 1
    You're right. I've confused the role role of machines involved in the request. Thank you ;) ! Answer updated – Echoes_86 Oct 4 '16 at 19:38
  • Other factors are probably the number of network interfaces, IP addresses, and the current availability of ephemeral client ports. – aventurin Oct 4 '16 at 20:01
  • MaxSessions specifically says it controls the number of sessions per network connection, those multiplexed over one TCP stream. It doesn't do anything about distinct connections, which is what you get by default when running ssh somehost and another ssh somehost. – ilkkachu Oct 4 '16 at 20:25

There are no limits specifically for ssh. There might be limits on the total number of processes you are permitted on the system 'A' but in my experience this is rare

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.