In Sshd Configuration What Does "Maxstartups 10:30:60" Mean

How can I limit the rate of new outgoing ssh connections when using GNU parallel?

I think we need a 'spawn at most this many jobs per second per host' option for GNU Parallel. It would probably make sense to have the default work for hosts with MaxStartups = 10:30:60, fast CPUs, but with 500 ms latency.

Can we discuss it on parallel@gnu.org?

Edit:

--sshdelay was implemented in version 20130122.

SSH: How could I know the concurrent limit?

I would like to log in 100 concurrent connection in one go. Which SSH paramerters I need to modify?

Well, I asked you to specify which ssh server you were using, but since you didn't respond, I'll have to assume you're using openssh.

The only sshd_config(5) configuration parameter I can see which might affect the number of connections you can make 'simultaneously' is MaxStartups, for which the docs say...

Specifies the maximum number of concurrent unauthenticated connections
to the SSH daemon. Additional connections will be dropped until
authentication succeeds or the LoginGraceTime expires for a
connection. The default is 10.

Alternatively, random early drop can be enabled by specifying the
three colon separated values “start:rate:full” (e.g. "10:30:60").
sshd(8) will refuse connection attempts with a probability of
“rate/100” (30%) if there are currently “start” (10) unauthenticated
connections. The probability increases linearly and all connection
attempts are refused if the number of unauthenticated connections
reaches “full” (60).

...so you'll probably have to set that value to at least 100.

Why does scp sporadically fail, when doing multiple scps in parallel?

This is probably caused by the limitation of parallel sessions in sshd_config. By default, server is configured to do "random early drop", which means refusing new connections, if amount of active is bigger than some limit. The responsible option is MaxStartups (from man sshd_config):

MaxStartups

Specifies the maximum number of concurrent unauthenticated connections to the SSH daemon. Additional connections will be dropped until authentication succeeds or the LoginGraceTime expires for a connection. The default is 10:30:100.

Alternatively, random early drop can be enabled by specifying the three colon separated values “start:rate:full” (e.g. "10:30:60"). sshd(8) will refuse connection attempts with a probability of “rate/100” (30%) if there are currently “start” (10) unauthenticated connections. The probability increases linearly and all connection attempts are refused if the number of unauthenticated connections reaches “full” (60).

Bumping the value to something bigger than the amount of connections you expect should solve your problem. Otherwise, you can set LogLevel DEBUG3 in sshd_config to see more logs in system log.


But when you are connecting to the same server, it is better to use connection multiplexing. It will be faster and you will not have these problems. Check out ControlMaster option in ssh_config or just check my similar answer for fast excursion to this "magic".



Related Topics



Leave a reply



Submit