Skip to content

Commit

Permalink
Ensure PasswordAuthentication is not duplicated in /etc/ssh/sshd_config
Browse files Browse the repository at this point in the history
  • Loading branch information
seth-reeser committed Sep 9, 2015
1 parent c82da7e commit 537a0b3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion VERSION.yml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
version: 1.1.0
version: 1.1.1
1 change: 1 addition & 0 deletions provisioners/redhat/modules/system.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# only allow authentication via ssh key pair
# suppress this - There were 34877 failed login attempts since the last successful login.
sed -i -e "s#PasswordAuthentication##g" /etc/ssh/sshd_config
if ! grep -q "PasswordAuthentication no" "/etc/ssh/sshd_config"; then
sudo bash -c 'echo "PasswordAuthentication no" >> /etc/ssh/sshd_config'
fi
Expand Down

0 comments on commit 537a0b3

Please sign in to comment.