From 4a295d4a6cd4597b9a3ebd3cf77ae9ee257629b3 Mon Sep 17 00:00:00 2001 From: Thomas Andrade Date: Tue, 31 May 2022 20:42:19 +0200 Subject: [PATCH] feat: Add support for extra sshd_config parameters via 'Include' file (#19842) Co-authored-by: techknowlogick --- docker/root/etc/s6/openssh/setup | 1 + docker/root/etc/templates/sshd_config | 2 ++ 2 files changed, 3 insertions(+) diff --git a/docker/root/etc/s6/openssh/setup b/docker/root/etc/s6/openssh/setup index f7843050c17..d4b9b9cd37d 100755 --- a/docker/root/etc/s6/openssh/setup +++ b/docker/root/etc/s6/openssh/setup @@ -49,6 +49,7 @@ if [ -d /etc/ssh ]; then 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}" \ + SSH_INCLUDE_FILE="${SSH_INCLUDE_FILE:+"Include "}${SSH_INCLUDE_FILE}" \ SSH_LOG_LEVEL=${SSH_LOG_LEVEL:-"INFO"} \ envsubst < /etc/templates/sshd_config > /etc/ssh/sshd_config diff --git a/docker/root/etc/templates/sshd_config b/docker/root/etc/templates/sshd_config index 6f1a3630459..17c2c397bbb 100644 --- a/docker/root/etc/templates/sshd_config +++ b/docker/root/etc/templates/sshd_config @@ -41,3 +41,5 @@ Banner none Subsystem sftp /usr/lib/ssh/sftp-server AcceptEnv GIT_PROTOCOL + +${SSH_INCLUDE_FILE}