Skip to content
This repository was archived by the owner on Dec 26, 2020. It is now read-only.

Commit 83ef891

Browse files
author
Colin Nolan
committed
Adds option to set whether password authentication is allowed with sshd.
1 parent 4af328a commit 83ef891

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

defaults/main.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,9 @@ ssh_server_weak_hmac: false # sshd
1717
ssh_client_weak_kex: false # ssh
1818
ssh_server_weak_kex: false # sshd
1919

20-
# If true, password login is allowed. For sshd, it is always set to no password login.
20+
# If true, password login is allowed
2121
ssh_client_password_login: false # ssh
22+
ssh_server_password_login: false # sshd
2223

2324
# ports on which ssh-server should listen
2425
ssh_server_ports: ['22'] # sshd

templates/opensshd.conf.j2

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ HostbasedAuthentication no
131131
UsePAM {{ 'yes' if ssh_use_pam else 'no' }}
132132

133133
# Disable password-based authentication, it can allow for potentially easier brute-force attacks.
134-
PasswordAuthentication no
134+
PasswordAuthentication {{ 'yes' if ssh_server_password_login else 'no' }}
135135
PermitEmptyPasswords no
136136
ChallengeResponseAuthentication {{ 'yes' if ssh_challengeresponseauthentication else 'no' }}
137137

0 commit comments

Comments
 (0)