forked from Shiloh/githaven
Configure OpenSSH log level via Environment in Docker (#19274)
Introduce a new environment variable: SSH_LOG_LEVEL
This commit is contained in:
parent
c83168104b
commit
ba5f2acb9c
@ -49,6 +49,7 @@ if [ -d /etc/ssh ]; then
|
|||||||
SSH_DSA_CERT="${SSH_DSA_CERT:+"HostCertificate "}${SSH_DSA_CERT}" \
|
SSH_DSA_CERT="${SSH_DSA_CERT:+"HostCertificate "}${SSH_DSA_CERT}" \
|
||||||
SSH_MAX_STARTUPS="${SSH_MAX_STARTUPS:+"MaxStartups "}${SSH_MAX_STARTUPS}" \
|
SSH_MAX_STARTUPS="${SSH_MAX_STARTUPS:+"MaxStartups "}${SSH_MAX_STARTUPS}" \
|
||||||
SSH_MAX_SESSIONS="${SSH_MAX_SESSIONS:+"MaxSessions "}${SSH_MAX_SESSIONS}" \
|
SSH_MAX_SESSIONS="${SSH_MAX_SESSIONS:+"MaxSessions "}${SSH_MAX_SESSIONS}" \
|
||||||
|
SSH_LOG_LEVEL=${SSH_LOG_LEVEL:-"INFO"} \
|
||||||
envsubst < /etc/templates/sshd_config > /etc/ssh/sshd_config
|
envsubst < /etc/templates/sshd_config > /etc/ssh/sshd_config
|
||||||
|
|
||||||
chmod 0644 /etc/ssh/sshd_config
|
chmod 0644 /etc/ssh/sshd_config
|
||||||
|
@ -8,7 +8,7 @@ ListenAddress ::
|
|||||||
${SSH_MAX_STARTUPS}
|
${SSH_MAX_STARTUPS}
|
||||||
${SSH_MAX_SESSIONS}
|
${SSH_MAX_SESSIONS}
|
||||||
|
|
||||||
LogLevel INFO
|
LogLevel ${SSH_LOG_LEVEL}
|
||||||
|
|
||||||
HostKey /data/ssh/ssh_host_ed25519_key
|
HostKey /data/ssh/ssh_host_ed25519_key
|
||||||
${SSH_ED25519_CERT}
|
${SSH_ED25519_CERT}
|
||||||
|
Loading…
Reference in New Issue
Block a user