os-hardening

Harden Linux systems with SSH, firewall, filesystem, patching, and auditing controls.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/prapanch/agent-coda --skill os-hardening
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: os-hardening
Source: https://github.com/prapanch/agent-coda/tree/main/sysadmin/os-hardening
Command: npx skills add https://github.com/prapanch/agent-coda --skill os-hardening

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill reduces the attack surface of a Linux system by disabling what is unnecessary, tightening permissions, and enforcing safer defaults that mitigate common intrusion paths.

Core Features & Use Cases

  • SSH and authentication hardening: disables root login, enforces key-only SSH, and applies safer access policies for users and service accounts.
  • Network exposure reduction: removes unnecessary listening services, applies default-deny firewall rules, and restricts internal services to localhost.
  • Filesystem and update hardening: locks down sensitive files, restricts execution in risky mount points like /tmp, and ensures security patching with safe reboot practices.
  • Audit and monitoring: enables auditing, logs privileged actions, and supports integrity monitoring to detect unexpected changes.
  • Use Case: When onboarding a new server before internet exposure or responding to a security scan finding, apply the checklist to bring the system in line with baseline hardening practices.

Quick Start

Use the os-hardening skill to produce a hardened baseline plan for a new Ubuntu/Debian server by applying SSH, firewall, filesystem, patching, and auditing recommendations.

Frequently Asked Questions about os-hardening

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

FAQPage Schema
How do I harden SSH on a new Linux server before exposing it to the internet?

To harden SSH on a Linux server, disable root login, enforce key-only authentication, and apply user allowlists. This reduces unauthorized access paths before safely exposing systems to the internet.

What is included in a Linux OS hardening baseline for security posture audits?

A Linux OS hardening baseline includes tightening authentication, reducing network exposure with default-deny firewall rules, restricting filesystem permissions, enabling automated patching, and configuring auditd for incident response monitoring.

How do I configure auditd for incident response and privileged action monitoring?

Configuring auditd for incident response involves enabling system auditing, logging privileged actions, and supporting integrity monitoring to detect unexpected file changes. This provides necessary visibility after remediation from scan findings.

Does this server security approach work with Ubuntu and Debian systems?

Yes, this server security hardening approach applies to Ubuntu and Debian systems. It produces a hardened baseline plan by applying SSH, firewall, filesystem, patching, and auditing recommendations tailored for those environments.

What is the best way to restrict network exposure on a Linux server using a firewall?

The best way to restrict network exposure is by removing unnecessary listening services, applying default-deny firewall rules, and restricting internal services to localhost. This minimizes external attack vectors on exposed servers.

How do I secure risky mount points like /tmp during filesystem hardening?

Securing risky mount points during filesystem hardening involves locking down sensitive files and restricting execution privileges in directories like /tmp. This prevents malicious scripts from running on the server.