Make PermitRootLogin regexp more generic

This commit is contained in:
Alexander Gorelyshev
2026-06-08 11:52:20 +04:00
parent 971006fbcd
commit d62db95075

View File

@@ -2,7 +2,7 @@
- name: "Restrictions | Configure SSH security restrictions" - name: "Restrictions | Configure SSH security restrictions"
loop: loop:
- { regexp: '^#?Protocol\s+', line: 'Protocol 2' } - { regexp: '^#?Protocol\s+', line: 'Protocol 2' }
- { regexp: '^PermitRootLogin yes', line: 'PermitRootLogin no' } - { regexp: '^#?\s*PermitRootLogin\s+', line: 'PermitRootLogin no' }
- { regexp: '^#?X11Forwarding', line: 'X11Forwarding no' } - { regexp: '^#?X11Forwarding', line: 'X11Forwarding no' }
- { regexp: '^#?IgnoreRhosts', line: 'IgnoreRhosts yes' } - { regexp: '^#?IgnoreRhosts', line: 'IgnoreRhosts yes' }
- { regexp: '^#?DebianBanner\s+', line: 'DebianBanner no' } - { regexp: '^#?DebianBanner\s+', line: 'DebianBanner no' }