aboutsummaryrefslogtreecommitdiff
path: root/docker
diff options
context:
space:
mode:
authorThomas Andrade2022-05-31 20:42:19 +0200
committerGitHub2022-05-31 14:42:19 -0400
commit4a295d4a6cd4597b9a3ebd3cf77ae9ee257629b3 (patch)
tree96d81c5475926a1a1ed21058e6cdff48b2c40f85 /docker
parente31c6166ee92c378c84570b2959f2fdb040d438a (diff)
feat: Add support for extra sshd_config parameters via 'Include' file (#19842)
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Diffstat (limited to 'docker')
-rwxr-xr-xdocker/root/etc/s6/openssh/setup1
-rw-r--r--docker/root/etc/templates/sshd_config2
2 files changed, 3 insertions, 0 deletions
diff --git a/docker/root/etc/s6/openssh/setup b/docker/root/etc/s6/openssh/setup
index f7843050c..d4b9b9cd3 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 6f1a36304..17c2c397b 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}