This repository has been archived on 2023-09-13. You can view files and clone it, but cannot push or open issues or pull requests.
homeserver-ansible/roles/system/tasks/sshd.yml

14 lines
333 B
YAML

- name: Disable SSH password auth
lineinfile:
dest: /etc/ssh/sshd_config
regexp: "^#PasswordAuthentication yes"
line: "PasswordAuthentication no"
notify: Restart sshd
- name: Change SSH port
lineinfile:
dest: /etc/ssh/sshd_config
regexp: "^#Port 22"
line: "Port {{ sshd_port }}"
notify: Restart sshd