From 0a96e59884ca5c4fedc8c3d166d97f35b245ad6e Mon Sep 17 00:00:00 2001 From: zeripath Date: Sat, 12 Oct 2019 16:45:00 +0100 Subject: [PATCH] Fix #8453 by making openssh listen on SSH_LISTEN_PORT not SSH_PORT (#8477) --- docker/root/etc/s6/openssh/setup | 1 + 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