diff --git a/README.md b/README.md index 8bc8083..8f043af 100644 --- a/README.md +++ b/README.md @@ -20,6 +20,6 @@ chmod 600 ~/.ssh/authorized_keys ``` ``` -sed -i "s/.*PasswordAuthentication.*/PasswordAuthentication no/g" /etc/ssh/sshd_config +sed -ri "s/^#? *PasswordAuthentication *yes.*/PasswordAuthentication no/" /etc/ssh/sshd_config sudo systemctl restart ssh ```