Bug 1943770 - Default MaxSessions is too low even for single use-cases
Summary: Default MaxSessions is too low even for single use-cases
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: openssh
Version: 33
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: ---
Assignee: Dmitry Belyavskiy
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-03-27 09:00 UTC by Sorin Sbarnea
Modified: 2021-06-17 14:44 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-06-17 14:44:52 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github docker compose issues 6463 0 None closed Secsh channel 10 open FAILED: open failed: Connect failed 2021-03-27 09:00:32 UTC

Description Sorin Sbarnea 2021-03-27 09:00:32 UTC
Description of problem:

Default MaxSession is too low to cover for even some single-user use-cases, like building containers remotely.

Version-Release number of selected component (if applicable):

openssh-server-8.4p1-5.fc33.x86_64



How reproducible:

Easily using docker-compose, especially newer versions which use multiple connection during the build process.

Upgrading MaxSessions to 50 fixed the issue, likely even lower values would be enough but I think that 50 should be safe already.

Keep in mind that number of sessions is not the same thing as number of users, lots of tools are using multiple session including ansible, vscode.

Let's put a default configuration that does not need tuning for normal usage.


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 1 Chris Murphy 2021-03-27 17:50:22 UTC
Fedora is using the upstream default.
https://github.com/openssh/openssh-portable/blob/ce941c75ea9cd6c358508a5b206809846c8d9240/sshd_config#L35
https://github.com/openssh/openssh-portable/blob/867a7dcf003c51d5a83f83565771a35f0d9530ac/servconf.h#L47

Looks like the config option was added in 2008, but the default has been 10 for a long time. I'm not finding upstream discussion asking for it to be changed. It probably should have an upstream discussion, or at least a Fedora devel@ discussion if the idea is for Fedora to deviate from upstream defaults and/or seek changing them.

Comment 2 Jakub Jelen 2021-03-29 07:51:36 UTC
Chris, you are right. This is default for ages and it works for normal use cases.

Sorin, if your docker requires more, you can configure it for more. This was not an issue for 13 years for anyone else. I would argue that running more than 10 parallel channels is really not a good idea and does not bring any more performance.


Note You need to log in before you can comment on or make changes to this bug.