Skip to content

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

License

Notifications You must be signed in to change notification settings

aminelch/ssh_config

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

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

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published