]> source.dussan.org Git - gitea.git/commitdiff
Fix #8453 by making openssh listen on SSH_LISTEN_PORT not SSH_PORT (#8477)
authorzeripath <art27@cantab.net>
Sat, 12 Oct 2019 15:45:00 +0000 (16:45 +0100)
committerLunny Xiao <xiaolunwen@gmail.com>
Sat, 12 Oct 2019 15:45:00 +0000 (23:45 +0800)
docker/root/etc/s6/openssh/setup
docker/root/etc/templates/sshd_config

index 10d195b74f70db2cf0a1fd14ed9c4d6ab5726f59..2a5eb9b09f0a93e5e1cc329d98bfcc3ffa4b22a1 100755 (executable)
@@ -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
index bf0b936d7c099bdf9ebdc1637b4a742f201bf285..20e0b36012c91427a6f279cfe0779faf635809a8 100644 (file)
@@ -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