Skip to content

Commit

Permalink
Dockerfile.test: don't unlock root account
Browse files Browse the repository at this point in the history
  • Loading branch information
dawidd6 authored Mar 23, 2020
1 parent 2f12615 commit ca781d9
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions Dockerfile.test
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit ca781d9

Please sign in to comment.