Skip to content

Commit 3d2cf77

Browse files
committedDec 18, 2015
Resolves buggy "without-password" ssh config
1 parent 9d92b51 commit 3d2cf77

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed
 

Diff for: ‎initialize.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -507,9 +507,9 @@ fi
507507
sshd_config_file=/etc/ssh/sshd_config
508508

509509
# attempt to modify in situ first.
510-
sed -i.bak -r -e "s/^\s*#*\s*PermitRootLogin [a-z]*/PermitRootLogin no/" \
510+
sed -i.bak -r -e "s/^\s*#*\s*PermitRootLogin [a-z\-]*/PermitRootLogin no/" \
511511
-e "0,/PermitRootLogin no/! s/PermitRootLogin no/#deleted/" \
512-
-e "s/^\s*#*\s*PasswordAuthentication [a-z]*/PasswordAuthentication no/" \
512+
-e "s/^\s*#*\s*PasswordAuthentication [a-z\-]*/PasswordAuthentication no/" \
513513
-e "0,/PasswordAuthentication no/! s/PasswordAuthentication no/#deleted/" \
514514
-e "/^#deleted/ D" $sshd_config_file
515515

0 commit comments

Comments
 (0)
Please sign in to comment.