vps-security-hardening

vps-security-hardening is a skill for Claude Code, Codex from kevinnft/ai-agent-skills. It costs 23 tokens per session (2,241 once invoked), scanned B, original, MIT.

A server-security checklist and setup guide for virtual private servers, or VPSs—remote machines rented from a hosting provider.

In plain words
What is it for?
Use it to audit a VPS, protect SSH access with fail2ban, strengthen SSH settings, and configure a firewall.
Why use it?
It helps reduce common risks such as SSH brute-force attacks and unnecessarily open network access.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to audit a VPS, protect SSH access with fail2ban, strengthen SSH settings, and configure a firewall.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/kevinnft/ai-agent-skills/vps-security-hardening
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add kevinnft/ai-agent-skills --skill vps-security-hardening
Clone the repo
git clone --depth 1 https://github.com/kevinnft/ai-agent-skills

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for vps-security-hardening

README.md
[![agentmods](https://agentmods.dev/badge/skills/kevinnft/ai-agent-skills/vps-security-hardening/github.svg)](https://agentmods.dev/skills/kevinnft/ai-agent-skills/vps-security-hardening)
Your own site
<a href="https://agentmods.dev/skills/kevinnft/ai-agent-skills/vps-security-hardening"><img src="https://agentmods.dev/badge/skills/kevinnft/ai-agent-skills/vps-security-hardening/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for vps-security-hardening

Your own site · 80×15
<a href="https://agentmods.dev/skills/kevinnft/ai-agent-skills/vps-security-hardening"><img src="https://agentmods.dev/badge/skills/kevinnft/ai-agent-skills/vps-security-hardening.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 23 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,241 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 2 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00023 $0.02241
Opus 5 $0.00012 $0.01120
Sonnet 5 $0.00005 $0.00448
Haiku 4.5 $0.00002 $0.00224

Measured 8d ago against content hash 8ca11f5f3860, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade B, and why

vps-security-hardening scanned grade B with 2 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 8d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Asks for rootlowPrivilege escalation

A mod that escalates privileges can change anything on the machine, not only the project.

sudo ss -tulpn

Downgraded: this mod is about security review, or the phrase is quoted, so it is likely naming the pattern rather than instructing it.

Reaches for credential filesmediumPrivilege escalation

SSH keys, cloud credentials, git-credentials, .npmrc, /etc/shadow: reading these is how a config file becomes a credential leak.

ssh-keygen -t ed25519 -f ~/.ssh/id_ed25519 -N '' -C "user@machine"

Downgraded: this mod is about security review, or the phrase is quoted, so it is likely naming the pattern rather than instructing it.

skills/devops/vps-security-hardening/SKILL.md · 356 lines

How it starts

The opening of the file, as written. The whole thing — 356 lines — stays where its author put it; the contents beside it link to each section on GitHub.

VPS Security Hardening

Audit and harden VPS security with fail2ban (brute-force protection), SSH hardening, and optional firewall setup.

When to Use

  • New VPS setup (initial hardening)
  • Security audit requested
  • SSH brute-force attacks detected
  • User wants to "secure VPS" or "protect server"

Prerequisites: Establishing SSH Access

Before hardening, ensure you can SSH into the VPS.

If Password Auth is Disabled (PublicKey only)

VPS providers often disable password auth by default. You need to add your SSH key first.

Option 1: Via VPS Web Console (Recommended)
  1. Generate SSH key locally (if not exists):

    ssh-keygen -t ed25519 -f ~/.ssh/id_ed25519 -N '' -C "user@machine"
    cat ~/.ssh/id_ed25519.pub
    
  2. Login to VPS via web console (provider dashboard → Console/Terminal)

  3. Add public key to VPS:

    mkdir -p ~/.ssh
    echo "ssh-ed25519 AAAA... user@machine" >> ~/.ssh/authorized_keys
    chmod 700 ~/.ssh
    chmod 600 ~/.ssh/authorized_keys
    
  4. Test from local machine:

    ssh root@VPS_IP
    
Option 2: Via Provider Dashboard

Most providers (DigitalOcean, Vultr, Biznet, etc.) have "Add SSH Key" in dashboard:

  • Copy public key (cat ~/.ssh/id_ed25519.pub)
  • Paste into provider's SSH key management
  • Rebuild/restart VPS (some providers require this)
Option 3: Enable Password Auth Temporarily

Only if web console is unavailable:

  1. Login via web console
  2. Edit SSH config:
    echo "PasswordAuthentication yes" >> /etc/ssh/sshd_config.d/99-temp-password.conf
    systemctl reload sshd
    
  3. SSH in with password, add your key
  4. Remove temp config:
    rm /etc/ssh/sshd_config.d/99-temp-password.conf
    systemctl reload sshd
    

Common Pitfall: sshpass with PublicKey-Only VPS

Problem: sshpass -p 'password' ssh user@host fails with "Permission denied (publickey)" even with correct password.

Why: VPS has PasswordAuthentication no in sshd_config — password auth is disabled at server level.

Read the full file on GitHub · 356 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 8d ago First seen · 356 lines · 23 tokens per session scan B 8ca11f5f3860

Subscribe to this mod's changes

vps-security-hardening is a skill published in the GitHub repository kevinnft/ai-agent-skills (14 stars, last pushed 1mo ago), licensed MIT. It adds 23 tokens to every session and 2,241 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it B with 2 findings (asks for root, reaches for credential files). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories

s3-estate-calibration-auditor

Audit an estate of AWS S3 buckets for the one bucket that is genuinely publicly or cross-account exposed, without over-flagging the many buckets that READ as exposed but are neutralised. Resolves each bucket's EFFECTIVE verdict by composing four layers (Block Public Access x bucket policy x bucket ACL x access…

anyshift-io/sre-skills · 293 tokens

ishosting-manager

Complete ishosting infrastructure management via API. Order and configure VPS, Dedicated, Storage, VPN servers with custom hardware. Install OS, control panels, deploy apps and websites. Manage SSH keys, billing, invoices, DNS, and service lifecycle.

ishosting/ishosting-manager · 54 tokens

latchbio-integration

Build, register, debug, and operate bioinformatics workflows on Latch using the Python SDK, CLI, Latch Data and Registry, Nextflow, Snakemake, programmatic execution, and Latch MCP. Use when authoring or deploying Latch workflows, configuring resources or interfaces, moving data, integrating Registry, or launching and…

K-Dense-AI/scientific-agent-skills · 76 tokens

iam

AWS Identity and Access Management for users, roles, policies, and permissions. Use when creating IAM policies, configuring cross-account access, setting up service roles, troubleshooting permission errors, or managing access control.

itsmostafa/aws-agent-skills · 42 tokens

vastai

Vast.ai CLI to manage GPU instances, volumes, serverless endpoints, and billing.

vast-ai/vast-cli · 21 tokens

component-family-consistency

Buttons, inputs, pills, badges, calendars, and other interactive components form a visual family — they share the same border-radius, colour logic, shadow scale, border style, and spacing rhythm. Inconsistency between them breaks the sense of a coherent product. Use when building or reviewing a component library…

dembrandt/dembrandt-skills · 76 tokens