server hardening

    by claude-dev-suite

    1

    Production-ready Linux security hardening for SSH, auditing, updates, and kernel networking.

    Free

    4 usesSecurity scanned

    Works with the AI Agents you already use

    server hardening

    Example session with this skill installed

    Generate a production-ready SSH hardening configuration and an auditd ruleset to track root command execution.

    • Read your context and instructions
    • Compiled the server hardening

    I have generated the hardening configurations for SSH and system auditing. These follow the principle of least privilege and CIS best practices.

    Production Server Hardening Configs

    1. SSH Hardening (/etc/ssh/sshd_config.d/99-hardening.conf)

    PermitRootLogin no
    PasswordAuthentication no
    ChallengeResponseAuthentication no
    AllowAgentForwarding no
    MaxAuthTries 3
    KexAlgorithms curve25519-sha256,curve25519-sha256@libssh.org,diffie-hellman-group16-sha512
    Ciphers chacha20-poly1305@openssh.com,aes256-gcm@openssh.com
    LogLevel VERBOSE
    

    2. Auditd Rules (/etc/audit/rules.d/99-security.rules)

    Rule TypeConfigurationDescription
    Cleanup-DFlush existing rules
    Buffer-b 8192Increase buffer for high-log volume
    Identity-w /etc/shadow -p wa -k identityTrack changes to user credentials
    PrivEsc-a always,exit -F arch=b64 -S execve -F euid=0 -F auid>=1000 -k root_cmdsLog all commands run as root by users
    Immutability-e 2Lock configuration until next reboot

    Next steps

    1. Run sshd -t to validate the SSH configuration before restarting the service.
    2. Execute augenrules --load to apply the new audit policies.
    3. Verify audit logging with ausearch -k root_cmds.

    Connects securely to your tools. The creator never sees your data.

    About this skill

    The problem

    Standard Linux server installations often ship with insecure defaults that leave systems vulnerable to automated brute-force attacks, rootkits, and lateral movement. Manually applying CIS Benchmarks across multiple configurations is error-prone and time-consuming.

    What it does

    • Configures automatic security updates with unattended-upgrades and needrestart for hands-off patching.
    • Hardens SSH access by enforcing key-only auth, restricting users, and disabling weak cryptographic algorithms.
    • Deploys auditd rulesets to track privilege escalation, file system changes, and suspicious system calls.
    • Sets up PAM login policies including account lockout thresholds and strict password complexity requirements.
    • Applies kernel-level network hardening via sysctl to mitigate spoofing and SYN flood attacks.

    Frameworks & tools

    Linux (Debian, Ubuntu, RHEL, CentOS), AppArmor, SELinux, auditd, PAM, rkhunter, and OpenSSH.

    Why this beats prompting it yourself

    Generic prompts often miss critical low-level details like PAM stack ordering or specific sysctl anti-spoofing flags. This skill provides production-ready configuration blocks and a 20-point checklist to ensure no hardening vector is overlooked.

    Use cases

    • Securing a fresh VPS or bare-metal server before deploying production workloads.
    • Establishing an audit trail for compliance requirements like PCI-DSS or SOC2.
    • Implementing Mandatory Access Control (MAC) profiles for high-risk web applications.
    • Automating routine security maintenance like rootkit scanning and package patching.

    Known limitations

    Does not manage application-layer WAF rules, external network firewalls, or container-specific security profiles like Docker seccomp.

    How to use

    1. 1

      Connect your agent to the Agensi MCP

      Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup

    2. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 3

      Ask for what you need

      Your agent loads this skill and uses it on your task. It always asks before buying a skill.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill goes through the trust checks below.

    Security scanned

    Checked by our 8-point scan before listing

    4 uses

    Times used to date

    Free to use

    No account required to browse

    Trust & safety

    Security scan

    Security scan passed 2 months ago

    • Free with an Agensi account

    Permissions

    Terminal / Shell
    Listed2 months ago

    What's inside

    Frequently Asked Questions

    This skill targets Debian-based systems (Ubuntu, Debian) and RHEL-based distributions (CentOS, RHEL), providing optimized configurations for PAM, SSH, and kernel parameters specific to each environment.

    You will receive a production-ready suite of configuration blocks, a comprehensive 20-point security checklist, and automated scripts for audit logging, rootkit scanning, and kernel-level network protection.

    While this skill hardens the OS and network stack, it does not configure external cloud firewalls (like AWS Security Groups), application-specific WAFs, or container-layer security like Docker seccomp.

    Yes, the skill is designed to integrate with standard AI agents capable of executing bash commands or modifying system files, allowing you to automate hardening during the initial server provisioning phase.

    Unlike generic prompts, this skill handles high-risk configurations like PAM stack ordering and specific sysctl anti-spoofing flags that are often missed or incorrectly applied by general-purpose models.

    The skill includes the setup of 'unattended-upgrades' and 'needrestart,' ensuring your server automatically applies critical security patches and identifies when services require a restart to stay protected.

    New in DevOps & Cloud

    Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for DevOps & Cloud.

    Free