26 lines
758 B
YAML
26 lines
758 B
YAML
- name: Add SSH Key - fern@muskduck
|
|
ansible.posix.authorized_key:
|
|
user: fern
|
|
state: present
|
|
key: "{{ lookup('file', '/home/fern/.ssh/id_ed25519.pub') }}"
|
|
|
|
- name: Add SSH Key - YubiKey
|
|
ansible.posix.authorized_key:
|
|
user: fern
|
|
state: present
|
|
key: "{{ lookup('file', '/home/fern/.ssh/id_ed25519_sk.pub') }}"
|
|
|
|
- name: Add SSH Key - fairywren
|
|
ansible.posix.authorized_key:
|
|
user: fern
|
|
state: present
|
|
key: "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIO8W3zggrj6ml/VZWem9l21SWK3yffgw5RkdgF6fG6jo u0_a336@localhostsk-ssh-ed25519@openssh.com"
|
|
|
|
- name: Disable root login
|
|
become: true
|
|
lineinfile:
|
|
path: /etc/ssh/sshd_config
|
|
regexp: "^PermitRootLogin"
|
|
line: "PermitRootLogin no"
|
|
backup: yes
|
|
notify: restart sshd
|