Skip to content

Commit

Permalink
improve PasswordAuthentication sed regex
Browse files Browse the repository at this point in the history
  • Loading branch information
valentinab25 committed Oct 13, 2020
1 parent d2c4e6f commit b574c1f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
mkdir -p /root/.ssh
> /root/.ssh/authorized_keys
chmod go-rwx /root/.ssh/authorized_keys
sed -i "s/#PasswordAuthentication yes/PasswordAuthentication no/g" /etc/ssh/sshd_config
sed -i "s/.*PasswordAuthentication .*/PasswordAuthentication no/g" /etc/ssh/sshd_config
sed -i 's/root:!/root:*/' /etc/shadow

# Provide SSH_AUTH_KEY_* via environment variable
Expand Down

0 comments on commit b574c1f

Please sign in to comment.