https://github.com/aminelch/ssh_config
Ansible role to secure SSH by disabling direct root login. It validates the configuration before restarting the SSH service to prevent accidental loss of access
https://github.com/aminelch/ssh_config
ansible ansible-role ssh ssh-config sshd-config
Last synced: about 2 months ago
JSON representation
Ansible role to secure SSH by disabling direct root login. It validates the configuration before restarting the SSH service to prevent accidental loss of access
- Host: GitHub
- URL: https://github.com/aminelch/ssh_config
- Owner: aminelch
- License: gpl-3.0
- Created: 2025-02-10T20:50:20.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-02-10T20:53:17.000Z (over 1 year ago)
- Last Synced: 2025-04-09T09:50:15.133Z (about 1 year ago)
- Topics: ansible, ansible-role, ssh, ssh-config, sshd-config
- Homepage:
- Size: 17.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Ansible Role: SSHD Configuration (`sshd_config_role`)
=========
## 📌 Description
This Ansible role secures the **SSHD service** by disabling direct root login (`PermitRootLogin no`).
It also **validates the SSH configuration** before restarting the service to prevent accidental loss of access.
---
## 📦 Requirements
- **Target OS**: Debian 11 / 12 (can be adapted for other distributions)
- **Ansible ≥ 2.9** installed on the control machine
- SSH access with sudo privileges