{"repo":"moltenbit/How-To-Secure-A-Linux-Server-With-Ansible","free":true,"listed":false,"github":"https://github.com/moltenbit/How-To-Secure-A-Linux-Server-With-Ansible","clone":"git clone https://github.com/moltenbit/How-To-Secure-A-Linux-Server-With-Ansible.git","description":"Ansible playbooks of \"How To Secure A Linux Server\".","language":null,"stars":262,"topics":["ansible","ansible-playbook","ansible-role","ansible-roles","hardening","hardening-steps","linux","linux-server","security","security-hardening"],"license":"CC-BY-SA-4.0","category":"deployment-docker-iac","readme_excerpt":"How To Secure A Linux Server With Ansible Ansible playbooks of \"How To Secure A Linux Server\". These Ansible playbooks are made to help install secure Linux servers faster. How to get started 1. Install Ansible 2. git clone this repository 4. Create SSH-Public/Private-Keys 5. Change all variables in group vars/variables.yml according to your needs. 6. Enable SSH root access before running the playbooks: 7. Recommended: configure static IP address on your system. 8. Add your systems IP address to hosts.yml . &nbsp; Run the requirements playbook using the root password you specified while installing the server: ansible-playbook --inventory hosts.yml --ask-pass requirements-playbook.yml &nbsp; Run the main playbook with the new users password you specified in the variables.yml file: ansible-playbook --inventory hosts.yml --ask-pass main-playbook.yml &nbsp; If you need to run the playbooks multiple times remember to use the SSH key and the new SSH port: ansible-playbook --inventory hosts.yml -e ansible ssh port=SSH PORT --key-file /PATH/TO/SSH/KEY main-playbook.yml &nbsp; Tested on Debian 12 and 13. Configurations The playbook uses most of the settings from \"How To Secure A Linux Server\" / my choices if the guide has more than one option to do something. Requirements - sudo installed - groups created for sshusers , sudousers and suusers - new user created with the name specified in variables.yml and added to groups - use of sudo limited to sudousers group - use of su limited to s","default_branch":null,"files":null,"tree":[],"storefront":"/r/moltenbit","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/moltenbit/How-To-Secure-A-Linux-Server-With-Ansible/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}