diff options
author | zeripath <art27@cantab.net> | 2019-10-12 16:45:00 +0100 |
---|---|---|
committer | Lunny Xiao <xiaolunwen@gmail.com> | 2019-10-12 23:45:00 +0800 |
commit | 0a96e59884ca5c4fedc8c3d166d97f35b245ad6e (patch) | |
tree | 455d958128569cd8e934a08df8bf4e3f2b66979d /docker | |
parent | f1fdd782d57ddbd2a759dad2843ee619709a4609 (diff) | |
download | gitea-0a96e59884ca5c4fedc8c3d166d97f35b245ad6e.tar.gz gitea-0a96e59884ca5c4fedc8c3d166d97f35b245ad6e.zip |
Fix #8453 by making openssh listen on SSH_LISTEN_PORT not SSH_PORT (#8477)
Diffstat (limited to 'docker')
-rwxr-xr-x | docker/root/etc/s6/openssh/setup | 1 | ||||
-rw-r--r-- | docker/root/etc/templates/sshd_config | 4 |
2 files changed, 3 insertions, 2 deletions
diff --git a/docker/root/etc/s6/openssh/setup b/docker/root/etc/s6/openssh/setup index 10d195b74f..2a5eb9b09f 100755 --- a/docker/root/etc/s6/openssh/setup +++ b/docker/root/etc/s6/openssh/setup @@ -26,6 +26,7 @@ fi if [ -d /etc/ssh ]; then SSH_PORT=${SSH_PORT:-"22"} \ + SSH_LISTEN_PORT=${SSH_LISTEN_PORT:-"${SSH_PORT}"} \ 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 bf0b936d7c..20e0b36012 100644 --- a/docker/root/etc/templates/sshd_config +++ b/docker/root/etc/templates/sshd_config @@ -1,4 +1,4 @@ -Port ${SSH_PORT} +Port ${SSH_LISTEN_PORT} Protocol 2 AddressFamily any @@ -30,4 +30,4 @@ AllowUsers ${USER} Banner none Subsystem sftp /usr/lib/ssh/sftp-server -AcceptEnv GIT_PROTOCOL
\ No newline at end of file +AcceptEnv GIT_PROTOCOL |