Skip to content

Commit 36b3af9

Browse files
committed
Fix go-gitea#8453 by making openssh listen on SSH_LISTEN_PORT not SSH_PORT
1 parent f1fdd78 commit 36b3af9

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

docker/root/etc/s6/openssh/setup

+1
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ fi
2626

2727
if [ -d /etc/ssh ]; then
2828
SSH_PORT=${SSH_PORT:-"22"} \
29+
SSH_LISTEN_PORT=${SSH_LISTEN_PORT:-"${SSH_PORT}"} \
2930
envsubst < /etc/templates/sshd_config > /etc/ssh/sshd_config
3031

3132
chmod 0644 /etc/ssh/sshd_config

docker/root/etc/templates/sshd_config

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Port ${SSH_PORT}
1+
Port ${SSH_LISTEN_PORT}
22
Protocol 2
33

44
AddressFamily any
@@ -30,4 +30,4 @@ AllowUsers ${USER}
3030
Banner none
3131
Subsystem sftp /usr/lib/ssh/sftp-server
3232

33-
AcceptEnv GIT_PROTOCOL
33+
AcceptEnv GIT_PROTOCOL

0 commit comments

Comments
 (0)