From ca781d9ed54286d338c7a715050f4e159ae61049 Mon Sep 17 00:00:00 2001 From: Dawid Dziurla Date: Mon, 23 Mar 2020 23:15:41 +0100 Subject: [PATCH] Dockerfile.test: don't unlock root account --- Dockerfile.test | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Dockerfile.test b/Dockerfile.test index 9ec3e95..72c974e 100644 --- a/Dockerfile.test +++ b/Dockerfile.test @@ -3,13 +3,12 @@ FROM alpine RUN apk -U add openssh-server openssh-sftp-server sudo python3 RUN adduser -D user RUN passwd -u user -RUN passwd -u root RUN echo "user ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers RUN echo "PasswordAuthentication no" > /etc/ssh/sshd_config RUN echo "PubkeyAuthentication yes" >> /etc/ssh/sshd_config RUN echo "AuthorizedKeysFile /etc/ssh/authorized_keys" >> /etc/ssh/sshd_config RUN echo "PermitRootLogin no" >> /etc/ssh/sshd_config -RUN echo "Subsystem sftp /usr/lib/ssh/sftp-server" >> /etc/ssh/sshd_config +RUN echo "Subsystem sftp /usr/lib/ssh/sftp-server" >> /etc/ssh/sshd_config RUN ssh-keygen -A