0
0
Fork 0
mirror of https://github.com/go-gitea/gitea synced 2024-11-25 05:02:49 +01:00

Fix #8453 by making openssh listen on SSH_LISTEN_PORT not SSH_PORT (#8477)

This commit is contained in:
zeripath 2019-10-12 16:45:00 +01:00 committed by Lunny Xiao
parent f1fdd782d5
commit 0a96e59884
2 changed files with 3 additions and 2 deletions

View file

@ -26,6 +26,7 @@ fi
if [ -d /etc/ssh ]; then if [ -d /etc/ssh ]; then
SSH_PORT=${SSH_PORT:-"22"} \ SSH_PORT=${SSH_PORT:-"22"} \
SSH_LISTEN_PORT=${SSH_LISTEN_PORT:-"${SSH_PORT}"} \
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

View file

@ -1,4 +1,4 @@
Port ${SSH_PORT} Port ${SSH_LISTEN_PORT}
Protocol 2 Protocol 2
AddressFamily any AddressFamily any
@ -30,4 +30,4 @@ AllowUsers ${USER}
Banner none Banner none
Subsystem sftp /usr/lib/ssh/sftp-server Subsystem sftp /usr/lib/ssh/sftp-server
AcceptEnv GIT_PROTOCOL AcceptEnv GIT_PROTOCOL