mirror of
https://github.com/ansible-lockdown/RHEL9-CIS.git
synced 2025-12-24 22:23:06 +00:00
X11Forwarding found in /etc/ssh/sshd_config.d/50-redhat.conf
Signed-off-by: Bas Meijer <bas.meijer@me.com>
This commit is contained in:
parent
baf8987a5f
commit
cc7f9ccfd0
1 changed files with 15 additions and 5 deletions
|
|
@ -232,11 +232,21 @@
|
|||
- rule_5.2.11
|
||||
|
||||
- name: "5.2.12 | PATCH | Ensure SSH X11 forwarding is disabled"
|
||||
ansible.builtin.lineinfile:
|
||||
path: "{{ rhel9_cis_sshd_config_file }}"
|
||||
regexp: "^#X11Forwarding|^X11Forwarding"
|
||||
line: 'X11Forwarding no'
|
||||
validate: sshd -t -f %s
|
||||
block:
|
||||
|
||||
- name: "5.2.12 | PATCH | Ensure SSH X11 forwarding is disabled | config file"
|
||||
ansible.builtin.lineinfile:
|
||||
path: "{{ rhel9_cis_sshd_config_file }}"
|
||||
regexp: "^#X11Forwarding|^X11Forwarding"
|
||||
line: 'X11Forwarding no'
|
||||
validate: sshd -t -f %s
|
||||
|
||||
- name: "5.2.12 | PATCH | Ensure SSH X11 forwarding is disabled | override"
|
||||
ansible.builtin.lineinfile:
|
||||
path: /etc/ssh/sshd_config.d/50-redhat.conf
|
||||
regexp: "^#X11Forwarding|^X11Forwarding"
|
||||
line: 'X11Forwarding no'
|
||||
validate: sshd -t -f %s
|
||||
when:
|
||||
- rhel9cis_rule_5_2_12
|
||||
tags:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue