geerlingguy / ansible-role-security

Ansible Role - Security

Home Page:https://galaxy.ansible.com/geerlingguy/security/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add validation to sshd_config update

rdonkin opened this issue · comments

Any plans to add validation using the equivalent of sshd -f /etc/ssh/sshd_config -t when updating the sshd_config file?

This will prevent this role from breaking SSH, which can happen without validation - for example if someone has made an invalid change to the config without restarting sshd, or if a modified version of this role includes invalid config.

It could work in similar way to the sudoers config validation, using the validate: feature of lineinfile.

Thanks to the absence of this validation just locked myself out of access by using yes instead of 'yes' in security_ssh_... variable. 🤦‍♂

commented

This issue has been marked 'stale' due to lack of recent activity. If there is no further activity, the issue will be closed in another 30 days. Thank you for your contribution!

Please read this blog post to see the reasons why I mark issues as stale.

commented

This issue has been closed due to inactivity. If you feel this is in error, please reopen the issue or file a new issue with the relevant details.