Skip to content

Commit

Permalink
refactor(dockerfiles): make sure password auth is enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
steveiliop56 committed Sep 5, 2024
1 parent 49b5084 commit 0d94d9a
Show file tree
Hide file tree
Showing 9 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion dockerfiles/Dockerfile.almalinux
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ RUN echo '%sudo ALL=(ALL:ALL) ALL' > /etc/sudoers.d/sudo
RUN adduser almalinux
RUN usermod -aG sudo almalinux

RUN echo 'PasswordAuthentication yes' >> /etc/ssh/sshd_config
RUN sed -i 's/PasswordAuthentication no/PasswordAuthentication yes/g' /etc/ssh/sshd_config
RUN mkdir -p /run/sshd
RUN ssh-keygen -A

Expand Down
2 changes: 1 addition & 1 deletion dockerfiles/Dockerfile.alpine
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ RUN echo '%sudo ALL=(ALL:ALL) ALL' > /etc/sudoers.d/sudo
RUN adduser -D alpine
RUN addgroup alpine sudo

RUN echo 'PasswordAuthentication yes' >> /etc/ssh/sshd_config
RUN sed -i 's/PasswordAuthentication no/PasswordAuthentication yes/g' /etc/ssh/sshd_config
RUN mkdir -p /run/sshd
RUN ssh-keygen -A

Expand Down
2 changes: 1 addition & 1 deletion dockerfiles/Dockerfile.amazonlinux
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ RUN echo '%sudo ALL=(ALL:ALL) ALL' > /etc/sudoers.d/sudo
RUN adduser amazonlinux
RUN usermod -aG sudo amazonlinux

RUN echo 'PasswordAuthentication yes' >> /etc/ssh/sshd_config
RUN sed -i 's/PasswordAuthentication no/PasswordAuthentication yes/g' /etc/ssh/sshd_config
RUN mkdir -p /run/sshd
RUN ssh-keygen -A

Expand Down
2 changes: 1 addition & 1 deletion dockerfiles/Dockerfile.archlinux
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ RUN echo '%sudo ALL=(ALL:ALL) ALL' > /etc/sudoers
RUN useradd archlinux
RUN usermod -aG sudo archlinux

RUN echo 'PasswordAuthentication yes' >> /etc/ssh/sshd_config
RUN sed -i 's/PasswordAuthentication no/PasswordAuthentication yes/g' /etc/ssh/sshd_config
RUN mkdir -p /run/sshd
RUN ssh-keygen -A

Expand Down
2 changes: 1 addition & 1 deletion dockerfiles/Dockerfile.debian
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ RUN apt update && apt install openssh-server sudo passwd -y
RUN adduser debian
RUN usermod -aG sudo debian

RUN echo 'PasswordAuthentication yes' >> /etc/ssh/sshd_config
RUN sed -i 's/PasswordAuthentication no/PasswordAuthentication yes/g' /etc/ssh/sshd_config
RUN mkdir -p /run/sshd
RUN ssh-keygen -A

Expand Down
2 changes: 1 addition & 1 deletion dockerfiles/Dockerfile.fedora
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ RUN echo '%sudo ALL=(ALL:ALL) ALL' > /etc/sudoers.d/sudo
RUN adduser fedora
RUN usermod -aG sudo fedora

RUN echo 'PasswordAuthentication yes' >> /etc/ssh/sshd_config
RUN sed -i 's/PasswordAuthentication no/PasswordAuthentication yes/g' /etc/ssh/sshd_config
RUN mkdir -p /run/sshd
RUN ssh-keygen -A

Expand Down
2 changes: 1 addition & 1 deletion dockerfiles/Dockerfile.oraclelinux
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ RUN echo '%sudo ALL=(ALL:ALL) ALL' > /etc/sudoers.d/sudo
RUN adduser oraclelinux
RUN usermod -aG sudo oraclelinux

RUN echo 'PasswordAuthentication yes' >> /etc/ssh/sshd_config
RUN sed -i 's/PasswordAuthentication no/PasswordAuthentication yes/g' /etc/ssh/sshd_config
RUN mkdir -p /run/sshd
RUN ssh-keygen -A

Expand Down
2 changes: 1 addition & 1 deletion dockerfiles/Dockerfile.rockylinux
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ RUN echo '%sudo ALL=(ALL:ALL) ALL' > /etc/sudoers.d/sudo
RUN adduser rockylinux
RUN usermod -aG sudo rockylinux

RUN echo 'PasswordAuthentication yes' >> /etc/ssh/sshd_config
RUN sed -i 's/PasswordAuthentication no/PasswordAuthentication yes/g' /etc/ssh/sshd_config
RUN mkdir -p /run/sshd
RUN ssh-keygen -A

Expand Down
2 changes: 1 addition & 1 deletion dockerfiles/Dockerfile.ubuntu
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ RUN apt update && apt install openssh-server sudo passwd -y
RUN adduser ubuntu
RUN usermod -aG sudo ubuntu

RUN echo 'PasswordAuthentication yes' >> /etc/ssh/sshd_config
RUN sed -i 's/PasswordAuthentication no/PasswordAuthentication yes/g' /etc/ssh/sshd_config
RUN mkdir -p /run/sshd
RUN ssh-keygen -A

Expand Down

0 comments on commit 0d94d9a

Please sign in to comment.