浏览代码

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

tags/v1.10.0-rc1
zeripath 4 年前
父节点
当前提交
0a96e59884
共有 2 个文件被更改,包括 3 次插入2 次删除
  1. 1
    0
      docker/root/etc/s6/openssh/setup
  2. 2
    2
      docker/root/etc/templates/sshd_config

+ 1
- 0
docker/root/etc/s6/openssh/setup 查看文件

@@ -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

+ 2
- 2
docker/root/etc/templates/sshd_config 查看文件

@@ -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
AcceptEnv GIT_PROTOCOL

正在加载...
取消
保存