Skip to content
Snippets Groups Projects
Commit 69594a39 authored by Zdeněk Vydra's avatar Zdeněk Vydra
Browse files

Enable SSH password auth when password is set

parent 25c5ab3f
No related branches found
No related tags found
No related merge requests found
- name: Reload SSH service
service:
name: sshd
state: reloaded
...@@ -22,3 +22,11 @@ ...@@ -22,3 +22,11 @@
name: '{{ kypo_user_access_username }}' name: '{{ kypo_user_access_username }}'
password: '{{ kypo_user_access_password | password_hash("sha512") }}' password: '{{ kypo_user_access_password | password_hash("sha512") }}'
when: kypo_user_access_password is defined and kypo_user_access_password when: kypo_user_access_password is defined and kypo_user_access_password
- name: enable SSH password authentication
lineinfile:
path: '/etc/ssh/sshd_config'
line: 'PasswordAuthentication yes'
regexp: '^#?PasswordAuthentication'
when: kypo_user_access_password is defined and kypo_user_access_password
notify: Reload SSH service
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment