We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9d92b51 commit 3d2cf77Copy full SHA for 3d2cf77
initialize.sh
@@ -507,9 +507,9 @@ fi
507
sshd_config_file=/etc/ssh/sshd_config
508
509
# attempt to modify in situ first.
510
-sed -i.bak -r -e "s/^\s*#*\s*PermitRootLogin [a-z]*/PermitRootLogin no/" \
+sed -i.bak -r -e "s/^\s*#*\s*PermitRootLogin [a-z\-]*/PermitRootLogin no/" \
511
-e "0,/PermitRootLogin no/! s/PermitRootLogin no/#deleted/" \
512
- -e "s/^\s*#*\s*PasswordAuthentication [a-z]*/PasswordAuthentication no/" \
+ -e "s/^\s*#*\s*PasswordAuthentication [a-z\-]*/PasswordAuthentication no/" \
513
-e "0,/PasswordAuthentication no/! s/PasswordAuthentication no/#deleted/" \
514
-e "/^#deleted/ D" $sshd_config_file
515
0 commit comments