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

Commit fd730df

Browse files
authored
Merge pull request #107 from colin-nolan/feature/106-password-server-login
Adds option to enable password based authentication on the server
2 parents 4af328a + a3d3de7 commit fd730df

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ Warning: This role disables root-login on the target server! Please make sure yo
4646
|`ssh_client_roaming` | false | enable experimental client roaming|
4747
|`sshd_moduli_minimum` | 2048 | remove Diffie-Hellman parameters smaller than the defined size to mitigate logjam|
4848
|`ssh_challengeresponseauthentication` | false | Specifies whether challenge-response authentication is allowed (e.g. via PAM) |
49+
|`ssh_client_password_login` | false | `true` to allow password-based authentication with the ssh client |
50+
|`ssh_server_password_login` | false | `true` to allow password-based authentication with the ssh server |
4951

5052
## Example Playbook
5153

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)