Revert "Revert "Disable password auth on dib images""

This reverts commit 08a258c96b.

Note the difference here is using all lower case for the options.  It
seems sshd is sensitive to the case.

Change-Id: Ide639491bcdedfb2ee8f76e8d0bfe83dde45805f
This commit is contained in:
Ian Wienand 2018-08-14 19:07:32 +10:00
parent 53b20ef975
commit 51486fe0c1
1 changed files with 6 additions and 1 deletions

View File

@ -25,4 +25,9 @@ set -o pipefail
# NOTE(pabelanger): Glean configures access for root user, so allow us to
# properly login.
sed -i -e'/PermitRootLogin/d' /etc/ssh/sshd_config \
&& echo "PermitRootLogin Yes" >> /etc/ssh/sshd_config
&& echo "PermitRootLogin yes" >> /etc/ssh/sshd_config
# NOTE(clarkb): Glean configures ssh keys only and not passwords. Disable
# unnecessary password auth.
sed -i -e '/PasswordAuthentication/d' /etc/ssh/sshd_config \
&& echo "PasswordAuthentication no" >> /etc/ssh/sshd_config