diff --git a/docker/root/etc/templates/sshd_config b/docker/root/etc/templates/sshd_config index ba92e236e..bf0b936d7 100644 --- a/docker/root/etc/templates/sshd_config +++ b/docker/root/etc/templates/sshd_config @@ -25,7 +25,7 @@ ChallengeResponseAuthentication no PasswordAuthentication no PermitEmptyPasswords no -AllowUsers git +AllowUsers ${USER} Banner none Subsystem sftp /usr/lib/ssh/sftp-server diff --git a/docker/root/usr/bin/entrypoint b/docker/root/usr/bin/entrypoint index d8e68b940..a3c03ecff 100755 --- a/docker/root/usr/bin/entrypoint +++ b/docker/root/usr/bin/entrypoint @@ -3,8 +3,6 @@ if [ "${USER}" != "git" ]; then # rename user sed -i -e "s/^git\:/${USER}\:/g" /etc/passwd - # switch sshd config to different user - sed -i -e "s/AllowUsers git$/AllowUsers ${USER}/g" /etc/ssh/sshd_config fi if [ -z "${USER_GID}" ]; then