diff --git a/scripts/common/sshd.sh b/scripts/common/sshd.sh index b12fd57f9..1bb16f56e 100644 --- a/scripts/common/sshd.sh +++ b/scripts/common/sshd.sh @@ -6,14 +6,14 @@ SSHD_CONFIG="/etc/ssh/sshd_config" sed -i -e '$a\' "$SSHD_CONFIG" USEDNS="UseDNS no" -if grep -q -E "^[:space:]*UseDNS" "$SSHD_CONFIG"; then +if grep -q -E "^[[:space:]]*UseDNS" "$SSHD_CONFIG"; then sed -i "s/^\s*UseDNS.*/${USEDNS}/" "$SSHD_CONFIG" else echo "$USEDNS" >>"$SSHD_CONFIG" fi GSSAPI="GSSAPIAuthentication no" -if grep -q -E "^[:space:]*GSSAPIAuthentication" "$SSHD_CONFIG"; then +if grep -q -E "^[[:space:]]*GSSAPIAuthentication" "$SSHD_CONFIG"; then sed -i "s/^\s*GSSAPIAuthentication.*/${GSSAPI}/" "$SSHD_CONFIG" else echo "$GSSAPI" >>"$SSHD_CONFIG"