|
|
@@ -892,10 +892,10 @@ rm -f /usr/sbin/policy-rc.d
|
|
|
sed -i "s/rdAuthentication no/rdAuthentication yes/g" /etc/ssh/sshd_config
|
|
|
|
|
|
# Enable SFTP subsystem for SSH
|
|
|
-sftp_subsys_enabled=$(grep "#Subsystem sftp-server" /etc/ssh/sshd_config)
|
|
|
+sftp_subsys_enabled=$(grep -iE "^#?.*subsystem.+(sftp )?sftp-server" /etc/ssh/sshd_config)
|
|
|
if [ ! -z "$sftp_subsys_enabled" ]; then
|
|
|
echo "(*) Updating SFTP subsystem configuration..."
|
|
|
- sed -i "s/#Subsystem sftp-server/Subsystem sftp internal-sftp/gI" /etc/ssh/sshd_config
|
|
|
+ sed -i -E "s/^#?.*Subsystem.+(sftp )?sftp-server/Subsystem sftp internal-sftp/g" /etc/ssh/sshd_config
|
|
|
fi
|
|
|
|
|
|
# Disable SSH suffix broadcast
|