From c89c0b2d8af32d6f3f4f2b42efc6a9511fa4aefc Mon Sep 17 00:00:00 2001 From: Ahmed Abdelhalim Date: Mon, 11 Aug 2025 00:32:01 +0200 Subject: Add ssh role --- roles/ssh/README.md | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 roles/ssh/README.md (limited to 'roles/ssh/README.md') diff --git a/roles/ssh/README.md b/roles/ssh/README.md new file mode 100644 index 00000000..7786808a --- /dev/null +++ b/roles/ssh/README.md @@ -0,0 +1,23 @@ +# Ansible Role: ssh + +This role configure the ssh functionality of a linux distro with hardening + +## Role Variables + +- `username` the user account to be added to the ssh allowed users. +- `ssh_port` the port number to be enabled for ssh (default: 2222) + +## Internals + +- ensure that ssh packages is installed and enabled +- configure ssh host keys +- configure ssh defaults + - disable keyboard interactive authentication + - disable PAM authentication +- configure ssh authentication policy (hardened) + - configure custom ssh port + - disable password authentication + - require public key authentication + - disable root login +- add user (username) to allowed authentication users +- TBA: `fail2ban` -- cgit v1.2.3