diff options
author | zeripath <art27@cantab.net> | 2021-06-01 20:55:17 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-01 15:55:17 -0400 |
commit | 894742278154781ba4cb347ac4c7efd7d6dcd1c8 (patch) | |
tree | 1dab53f56de175bb14a68f134b83df35636ea34f /docker | |
parent | 7081046b5f3665860b65eb0c0c12eb77a3994727 (diff) | |
download | gitea-894742278154781ba4cb347ac4c7efd7d6dcd1c8.tar.gz gitea-894742278154781ba4cb347ac4c7efd7d6dcd1c8.zip |
Fix bug due to missing MaxStartups and MaxSessions (#16046)
Unforunately #16009 makes these settings mandatory. This PR uses the same technique
as used for the certificates to make these settings non-mandatory.
Fix #16044
Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: 6543 <6543@obermui.de>
Diffstat (limited to 'docker')
-rwxr-xr-x | docker/root/etc/s6/openssh/setup | 2 | ||||
-rw-r--r-- | docker/root/etc/templates/sshd_config | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/docker/root/etc/s6/openssh/setup b/docker/root/etc/s6/openssh/setup index 5601994d66..89c03092be 100755 --- a/docker/root/etc/s6/openssh/setup +++ b/docker/root/etc/s6/openssh/setup @@ -47,6 +47,8 @@ if [ -d /etc/ssh ]; then SSH_RSA_CERT="${SSH_RSA_CERT:+"HostCertificate "}${SSH_RSA_CERT}" \ SSH_ECDSA_CERT="${SSH_ECDSA_CERT:+"HostCertificate "}${SSH_ECDSA_CERT}" \ SSH_DSA_CERT="${SSH_DSA_CERT:+"HostCertificate "}${SSH_DSA_CERT}" \ + SSH_MAX_STARTUPS="${SSH_MAX_STARTUPS:+"MaxStartups "}${SSH_MAX_STARTUPS}" \ + SSH_MAX_SESSIONS="${SSH_MAX_SESSIONS:+"MaxSessions "}${SSH_MAX_SESSIONS}" \ envsubst < /etc/templates/sshd_config > /etc/ssh/sshd_config chmod 0644 /etc/ssh/sshd_config diff --git a/docker/root/etc/templates/sshd_config b/docker/root/etc/templates/sshd_config index a0ff0651d9..8d336f3a8e 100644 --- a/docker/root/etc/templates/sshd_config +++ b/docker/root/etc/templates/sshd_config @@ -5,8 +5,8 @@ AddressFamily any ListenAddress 0.0.0.0 ListenAddress :: -MaxStartups ${SSH_MAX_STARTUPS} -MaxSessions ${SSH_MAX_SESSIONS} +${SSH_MAX_STARTUPS} +${SSH_MAX_SESSIONS} LogLevel INFO |