mirror of
https://github.com/transatoshi-mw/grinminer.net.git
synced 2025-10-06 22:02:48 +00:00
updated ssh-hardening.yml
This commit is contained in:
@@ -22,14 +22,21 @@
|
|||||||
- name: Replace PermitRootLogin
|
- name: Replace PermitRootLogin
|
||||||
ansible.builtin.replace:
|
ansible.builtin.replace:
|
||||||
path: /etc/ssh/sshd_config
|
path: /etc/ssh/sshd_config
|
||||||
regexp: PermitRootLogin yes
|
regexp: 'PermitRootLogin yes'
|
||||||
replace: PermitRootLogin prohibit-password
|
replace: 'PermitRootLogin prohibit-password'
|
||||||
|
|
||||||
- name: Replace PasswordAuthentication
|
- name: Replace PasswordAuthentication
|
||||||
ansible.builtin.replace:
|
ansible.builtin.replace:
|
||||||
path: /etc/ssh/sshd_config
|
path: /etc/ssh/sshd_config
|
||||||
regexp: PasswordAuthentication yes
|
regexp: '#PasswordAuthentication yes'
|
||||||
replace: PasswordAuthentication no
|
replace: 'PasswordAuthentication no'
|
||||||
|
|
||||||
|
- name: Replace PasswordAuthentication
|
||||||
|
ansible.builtin.replace:
|
||||||
|
path: /etc/ssh/sshd_config
|
||||||
|
regexp: 'PasswordAuthentication yes'
|
||||||
|
replace: 'PasswordAuthentication no'
|
||||||
|
|
||||||
|
|
||||||
- name: Restart SSH
|
- name: Restart SSH
|
||||||
ansible.builtin.shell:
|
ansible.builtin.shell:
|
||||||
|
Reference in New Issue
Block a user