mirror of
https://github.com/transatoshi-mw/grinminer.net.git
synced 2025-10-06 22:02:48 +00:00
Add files via upload
This commit is contained in:
25
ansible/ssh-softening.yml
Normal file
25
ansible/ssh-softening.yml
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
- hosts: all
|
||||||
|
remote_user: root
|
||||||
|
tasks:
|
||||||
|
|
||||||
|
- name: Replace PermitRootLogin
|
||||||
|
ansible.builtin.replace:
|
||||||
|
path: /etc/ssh/sshd_config
|
||||||
|
regexp: 'PermitRootLogin prohibit-password'
|
||||||
|
replace: 'PermitRootLogin yes'
|
||||||
|
|
||||||
|
- name: Replace PasswordAuthentication
|
||||||
|
ansible.builtin.replace:
|
||||||
|
path: /etc/ssh/sshd_config
|
||||||
|
regexp: 'PasswordAuthentication no'
|
||||||
|
replace: 'PasswordAuthentication yes'
|
||||||
|
|
||||||
|
- name: Replace PasswordAuthentication
|
||||||
|
ansible.builtin.replace:
|
||||||
|
path: /etc/ssh/sshd_config
|
||||||
|
regexp: '#PasswordAuthentication no'
|
||||||
|
replace: 'PasswordAuthentication yes'
|
||||||
|
|
||||||
|
- name: Restart SSH
|
||||||
|
ansible.builtin.shell:
|
||||||
|
cmd: systemctl restart ssh
|
Reference in New Issue
Block a user