ssh
parent
82ce09f773
commit
c54cd719e9
|
@ -5,3 +5,8 @@
|
|||
daemon_reload: yes
|
||||
enabled: yes
|
||||
state: restarted
|
||||
|
||||
- name: restart_sshd
|
||||
ansible.builtin.systemd:
|
||||
name: sshd.service
|
||||
state: restarted
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
- include: packages.yml
|
||||
- include: users.yml
|
||||
- include: nix.yml
|
||||
- include: sshd.yml
|
||||
|
||||
- name: Disable wake on USB
|
||||
import_tasks: disable_usb_wake.yml
|
||||
|
|
|
@ -0,0 +1,14 @@
|
|||
---
|
||||
- name: Disable password-based SSH root login
|
||||
lineinfile:
|
||||
path: /etc/ssh/sshd_config
|
||||
regexp: '^PermitRootLogin'
|
||||
line: 'PermitRootLogin prohibit-password'
|
||||
notify: restart_sshd
|
||||
|
||||
# - name: Disable password authentication
|
||||
# lineinfile:
|
||||
# path: /etc/ssh/sshd_config
|
||||
# regexp: '^PasswordAuthentication'
|
||||
# line: 'PasswordAuthentication no'
|
||||
# notify: restart_sshd
|
|
@ -1,7 +1,19 @@
|
|||
---
|
||||
- name: Sudo group
|
||||
group:
|
||||
name: sudo
|
||||
state: present
|
||||
|
||||
- name: Configure user earne
|
||||
user:
|
||||
name: earne
|
||||
comment: earnest ma
|
||||
shell: /usr/bin/zsh
|
||||
groups: docker,earne,mock,wheel
|
||||
|
||||
- authorized_key:
|
||||
user: earne
|
||||
state: present
|
||||
key: |
|
||||
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIClkhr7Rc2qbSEQ+MkEsD/147gb0pShJt+odxis76WRe main
|
||||
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPcKxz8Risfe13F+LxnUD5V1kApoxDtU7dO901SJiP6J backupk
|
||||
|
|
Loading…
Reference in New Issue