Skip to content

Commit

Permalink
Modify Ubuntu bash remediation for sshd_use_approved_macs_ordered_stig
Browse files Browse the repository at this point in the history
The remediation now uses the bash_sshd_remediation macro and the
sshd_approved_macs variable.
  • Loading branch information
mpurg committed May 9, 2024
1 parent 41f8ab7 commit 63f543d
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
# platform = Red Hat Enterprise Linux 7,Oracle Linux 7,multi_platform_sle,multi_platform_ubuntu

{{%- if 'ubuntu' in product %}}
{{{ bash_instantiate_variables('sshd_approved_macs') }}}
{{{ bash_sshd_remediation(parameter="MACs", value="$sshd_approved_macs", config_is_distributed=sshd_distributed_config) }}}
{{%- else %}}
if grep -q -P '^\s*MACs\s+' /etc/ssh/sshd_config; then
sed -i 's/^\s*MACs.*/MACs hmac-sha2-512,hmac-sha2-256/' /etc/ssh/sshd_config
else
echo "MACs hmac-sha2-512,hmac-sha2-256" >> /etc/ssh/sshd_config
fi
{{%- endif %}}

0 comments on commit 63f543d

Please sign in to comment.