linux-security-hardener

Generate a Linux server hardening plan with SSH, firewall, audit, and sysctl configs.

3|1|Updated Feb 24, 2026
One-click install
npx skills add https://github.com/chfle/lehnert-claude-skills --skill linux-security-hardener
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: linux-security-hardener
Source: https://github.com/chfle/lehnert-claude-skills/tree/main/skills/linux-security-hardener
Command: npx skills add https://github.com/chfle/lehnert-claude-skills --skill linux-security-hardener

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Linux servers often remain misconfigured and exposed, requiring manual hardening steps that are error-prone and time-consuming. This Skill generates a complete, prioritized hardening plan with ready-to-apply configs and scripts to reduce attack surface and meet benchmarks.

Core Features & Use Cases

  • System updates and unattended upgrades
  • SSH hardening, firewall, and fail2ban configuration
  • Kernel sysctl hardening, safe defaults, and auditd rules
  • A master hardening script (harden.sh) and drop-in configs to apply changes
  • Use cases include onboarding a fresh VPS, hardening an existing server, or preparing a Docker host or web server for production.

Quick Start

Run the master hardening script as root to apply the complete Linux server hardening plan.

Frequently Asked Questions about linux-security-hardener

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I harden a Linux server for production?

To harden a Linux server, you need to apply secure SSH configurations, firewall rules, kernel sysctl settings, and auditd rules. This process is automated by generating a master hardening script and drop-in configs to reduce the server's attack surface.

What is the best way to automate SSH hardening and firewall configuration on Ubuntu?

Automating SSH hardening and firewall configuration involves generating ready-to-apply scripts that enforce secure defaults. You can use a generated master script to automatically apply drop-in SSH configs, firewall rules, and fail2ban settings specifically for Ubuntu and Debian environments.

Does this Linux server hardening approach work with RHEL and Arch Linux?

Yes, this Linux server hardening approach works with RHEL, Rocky, AlmaLinux, Arch, Ubuntu, and Debian. It generates platform-appropriate security configurations, including kernel sysctl settings and auditd rules tailored to these specific distributions.

Can I use this to harden an existing Linux server or does it require a fresh install?

You can use this to harden both fresh VPS installs and existing Linux servers. The generated hardening plan applies system updates, unattended upgrades, and auditd rules safely to servers already in production without requiring a clean slate.

What configurations are included in an automated Linux server hardening plan?

An automated Linux server hardening plan includes drop-in SSH hardening configurations, firewall rules, kernel sysctl settings, auditd rules, and fail2ban setup. These are packaged into a master script to apply changes automatically.

Do I need to manually configure kernel sysctl settings and auditd rules for server security?

No, you do not need to manually configure kernel sysctl settings and auditd rules. The hardening process generates prioritized, ready-to-apply configurations and a master script that automates these kernel-level security changes for you.