This repository was archived by the owner on Dec 26, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +9
-0
lines changed Expand file tree Collapse file tree 3 files changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -56,6 +56,7 @@ Warning: This role disables root-login on the target server! Please make sure yo
5656| ` ssh_client_password_login ` | false | ` true ` to allow password-based authentication with the ssh client |
5757| ` ssh_server_password_login ` | false | ` true ` to allow password-based authentication with the ssh server |
5858| ` ssh_google_auth ` | false | ` true ` to enable google authenticator based TOTP 2FA |
59+ | ` ssh_pam_device ` | false | ` true ` to enable public key auth with pam device 2FA |
5960| ` ssh_banner ` | ` false ` | ` true ` to print a banner on login |
6061| ` ssh_client_hardening ` | ` true ` | ` false ` to stop harden the client |
6162| ` ssh_client_port ` | ` '22' ` | Specifies the port number to connect on the remote host. |
Original file line number Diff line number Diff line change @@ -79,6 +79,9 @@ ssh_use_pam: false # sshd
7979# false to disable google 2fa authentication
8080ssh_google_auth : false # sshd
8181
82+ # false to disable pam device 2FA input
83+ ssh_pam_device : false # sshd
84+
8285# if specified, login is disallowed for user names that match one of the patterns.
8386ssh_deny_users : ' ' # sshd
8487
Original file line number Diff line number Diff line change @@ -99,6 +99,11 @@ UsePAM {{ 'yes' if (ssh_use_pam|bool) else 'no' }}
9999AuthenticationMethods publickey,keyboard-interactive
100100{% endif %}
101101
102+ # Force public key auth then ask for pam device input
103+ {% if ssh_pam_device %}
104+ AuthenticationMethods publickey,keyboard-interactive:pam
105+ {% endif %}
106+
102107# Disable password-based authentication, it can allow for potentially easier brute-force attacks.
103108PasswordAuthentication {{ 'yes' if (ssh_server_password_login|bool) else 'no' }}
104109PermitEmptyPasswords no
You can’t perform that action at this time.
0 commit comments