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

Commit 3a79dab

Browse files
committed
Merge pull request #29 from ypid/make-client-pw-auth-configurable
Make ssh client password login configurable.
2 parents ba7afdf + 10f6544 commit 3a79dab

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

roles/ansible-ssh-hardening/defaults/main.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +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.
21+
ssh_client_password_login: false # ssh
22+
2023
# ports to which ssh-server should listen to and ssh-client should connect to
2124
ssh_ports: ['22'] # sshd + ssh
2225

roles/ansible-ssh-hardening/templates/openssh.conf.j2

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ RhostsRSAAuthentication no
125125
RSAAuthentication yes
126126

127127
# Disable password-based authentication, it can allow for potentially easier brute-force attacks.
128-
PasswordAuthentication no
128+
PasswordAuthentication {{ 'yes' if ssh_client_password_login else 'no' }}
129129

130130
# Only use GSSAPIAuthentication if implemented on the network.
131131
GSSAPIAuthentication no

0 commit comments

Comments
 (0)