Skip to content

Commit

Permalink
fix script
Browse files Browse the repository at this point in the history
  • Loading branch information
ogrand committed Jun 10, 2024
1 parent fc4bd02 commit 0b1c478
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tools/disable_ssh_password_auth.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

echo "Disabling ssh password authentication..."
sed -i 's/^PasswordAuthentication .*/PasswordAuthentication no/g' /etc/ssh/sshd_config
sudo sh -c "echo \"bosh:\$(date +%s | sha256sum | base64 | head -c 32 ; echo\)\" | chpasswd"
pwd="$(echo "bosh:$(date +%s | sha256sum | base64 | head -c 32)")"
sudo sh -c "echo ${pwd} | chpasswd"
chage -I -1 -m 0 -M 99999 -E -1 bosh
echo "Disabling ssh password authentication done."

0 comments on commit 0b1c478

Please sign in to comment.