Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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