Browse Source

feat: Add support for extra sshd_config parameters via 'Include' file (#19842)

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
pull/19857/head
Thomas Andrade 1 month ago committed by GitHub
parent
commit
4a295d4a6c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      docker/root/etc/s6/openssh/setup
  2. 2
      docker/root/etc/templates/sshd_config

1
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

2
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}

Loading…
Cancel
Save