🔑 Increase MaxAuthTries in SSH for folks with many keys

This commit is contained in:
Jérôme Petazzoni
2021-12-07 12:08:44 +01:00
parent 74947e8265
commit eced9b46d6

View File

@@ -75,9 +75,11 @@ _cmd_createuser() {
echo '$USER_LOGIN ALL=(ALL) NOPASSWD:ALL' | sudo tee /etc/sudoers.d/$USER_LOGIN
"
# The MaxAuthTries is here to help with folks who have many SSH keys.
pssh "
set -e
sudo sed -i 's/PasswordAuthentication no/PasswordAuthentication yes/' /etc/ssh/sshd_config
sudo sed -i 's/#MaxAuthTries 6/MaxAuthTries 42/' /etc/ssh/sshd_config
sudo service ssh restart
"