Skip to content
Snippets Groups Projects
Commit 72af8e0f authored by Chris Croome's avatar Chris Croome
Browse files

sshd role added

parent 60cced38
No related branches found
No related tags found
No related merge requests found
---
- name: Ssh root login keys only
lineinfile:
backup: yes
backrefs: yes
state: present
line: "PermitRootLogin prohibit-password"
regexp: "^PermitRootLogin"
dest: "/etc/ssh/sshd_config"
- name: Tunneled clear text passwords disabled
lineinfile:
backup: yes
backrefs: yes
state: present
line: "PasswordAuthentication no"
regexp: "^#?PasswordAuthentication"
dest: "/etc/ssh/sshd_config"
- name: Public key based logins only
lineinfile:
backup: yes
state: present
line: "AuthenticationMethods publickey"
regexp: "^AuthenticationMethods"
insertafter: "^#?PubkeyAuthentication"
dest: "/etc/ssh/sshd_config"
- name: Sshd restarted
service:
name: ssh
state: restarted
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment