Skip to content

Commit

Permalink
Fix #8453 by making openssh listen on SSH_LISTEN_PORT not SSH_PORT (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
zeripath authored and lunny committed Oct 12, 2019
1 parent f1fdd78 commit 0a96e59
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions docker/root/etc/s6/openssh/setup
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions docker/root/etc/templates/sshd_config
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Port ${SSH_PORT}
Port ${SSH_LISTEN_PORT}
Protocol 2

AddressFamily any
Expand Down Expand Up @@ -30,4 +30,4 @@ AllowUsers ${USER}
Banner none
Subsystem sftp /usr/lib/ssh/sftp-server

AcceptEnv GIT_PROTOCOL
AcceptEnv GIT_PROTOCOL

0 comments on commit 0a96e59

Please sign in to comment.