summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xdocker/root/etc/s6/openssh/setup1
-rw-r--r--docker/root/etc/templates/sshd_config4
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