new major update
This commit is contained in:
60 files changed
+2228
-615
No files matched your search
@@ -67,12 +67,13 @@
|
||||
owner: root
|
||||
group: root
|
||||
mode: "644"
|
||||
- name: Prioritizing authentication methods in SSH
|
||||
- name: Allowing interactive keyboard authentication
|
||||
become: true
|
||||
ansible.builtin.lineinfile:
|
||||
path: /etc/ssh/sshd_config.d/auth.conf
|
||||
line: "KbdInteractiveAuthentication yes # enable if implementing TOTP 2FA"
|
||||
regexp: "^KbdInteractiveAuthentication"
|
||||
line: "KbdInteractiveAuthentication yes # enable if implementing TOTP 2FA"
|
||||
insertafter: EOF
|
||||
owner: root
|
||||
group: root
|
||||
mode: "644"
|
||||
@@ -80,12 +81,20 @@
|
||||
become: true
|
||||
ansible.builtin.lineinfile:
|
||||
path: /etc/ssh/sshd_config.d/auth.conf
|
||||
regexp: "^AuthenticationMethods"
|
||||
line: "AuthenticationMethods publickey keyboard-interactive:pam"
|
||||
insertafter: "^KbdInteractiveAuthentication"
|
||||
owner: root
|
||||
group: root
|
||||
mode: "644"
|
||||
# - name: Adding Google Authenticator OTP module PAM authentication line for SSH
|
||||
- name: Restarting SystemD SSH service
|
||||
become: true
|
||||
ansible.builtin.systemd_service:
|
||||
name: sshd
|
||||
scope: system
|
||||
state: restarted
|
||||
enabled: true
|
||||
# - name: Adding Google Authenticator OTP module PAM authentication line for sudo
|
||||
# become: true
|
||||
# ansible.builtin.lineinfile:
|
||||
# path: /etc/pam.d/sudo
|
||||
@@ -94,7 +103,7 @@
|
||||
# owner: root
|
||||
# group: root
|
||||
# mode: "644"
|
||||
# - name: Adding Google Authenticator OTP module PAM authentication line for SSH
|
||||
# - name: Adding Google Authenticator OTP module PAM authentication line for sudo
|
||||
# become: true
|
||||
# ansible.builtin.lineinfile:
|
||||
# path: /etc/pam.d/su
|
||||
@@ -102,9 +111,4 @@
|
||||
# insertafter: "include common-auth$"
|
||||
# owner: root
|
||||
# group: root
|
||||
# mode: "644"
|
||||
- name: Restarting SystemD SSH service
|
||||
become: true
|
||||
ansible.builtin.systemd_service:
|
||||
name: sshd
|
||||
state: restarted
|
||||
# mode: "644"
|
||||
Reference in new issue
Block a user