ssh-hardening

ssh-hardening is a skill for Claude Code, Codex from LuuOW/meridian-mcp. It costs 34 tokens per session (1,033 once invoked), scanned B, original, MIT.

A collection of configuration patterns for hardening SSH, the standard tool for securely logging into Linux servers. It covers key-only access, user restrictions, forwarding settings, connection limits, and configuration checks.

In plain words
What is it for?
Use it when configuring a new server, restricting who can connect, disabling unsafe login options, and checking SSH settings before reloading them.
Why use it?
It helps reduce common remote-login risks such as password attacks, root access, and unnecessary SSH features.

Skill for Claude CodeCodex

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

Good fit Use it when configuring a new server, restricting who can connect, disabling unsafe login options, and checking SSH settings before reloading them.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/luuow/meridian-mcp/ssh-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 LuuOW/meridian-mcp --skill ssh-hardening
Clone the repo
git clone --depth 1 https://github.com/LuuOW/meridian-mcp

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 ssh-hardening

README.md
[![agentmods](https://agentmods.dev/badge/skills/luuow/meridian-mcp/ssh-hardening/github.svg)](https://agentmods.dev/skills/luuow/meridian-mcp/ssh-hardening)
Your own site
<a href="https://agentmods.dev/skills/luuow/meridian-mcp/ssh-hardening"><img src="https://agentmods.dev/badge/skills/luuow/meridian-mcp/ssh-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 ssh-hardening

Your own site · 80×15
<a href="https://agentmods.dev/skills/luuow/meridian-mcp/ssh-hardening"><img src="https://agentmods.dev/badge/skills/luuow/meridian-mcp/ssh-hardening.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 34 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,033 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.00034 $0.01033
Opus 5.5 $0.00014 $0.00413
Sonnet 5.5 $0.00007 $0.00207
Haiku 4.5 $0.00003 $0.00103

Measured 2mo ago against content hash b5d9d89155d0, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade B, and why

ssh-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 2mo 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.

'mkdir -p ~/.ssh && cat >> ~/.ssh/authorized_keys && chmod 600 ~/.ssh/authorized_keys'

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 -C "deploy@$(hostname)" -f ~/.ssh/id_ed25519

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

skills/ssh-hardening/SKILL.md · 129 lines

How it starts

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

ssh-hardening

Minimal SSH hardening patterns. Apply to any Linux server immediately after provisioning. These are configuration fragments — combine with firewall rules and fail2ban for a complete posture.

sshd_config Hardened Baseline

# /etc/ssh/sshd_config.d/99-hardening.conf
# Drop-in override — survives package upgrades better than editing sshd_config directly

# Disable password auth — key-only
PasswordAuthentication no
KbdInteractiveAuthentication no
UsePAM no

# Disable root login entirely
PermitRootLogin no

# Only named users can SSH in
AllowUsers deploy ci-agent

# Disable legacy and dangerous features
X11Forwarding no
AllowAgentForwarding no
AllowTcpForwarding no
PermitTunnel no

# Enforce protocol and key type minimums
Protocol 2
HostKeyAlgorithms ssh-ed25519,rsa-sha2-512,rsa-sha2-256
PubkeyAcceptedAlgorithms ssh-ed25519,rsa-sha2-512,rsa-sha2-256

# Timeout idle sessions
ClientAliveInterval 300
ClientAliveCountMax 2
LoginGraceTime 30

# Limit authentication attempts per connection
MaxAuthTries 3

# Restrict to specific port (obscures in logs; not a security control)
# Port 2222
# Validate and reload
sshd -t                          # syntax check (no restart)
systemctl reload ssh

Key Management

# Generate ed25519 key (preferred — smaller, faster, same security as RSA-4096)
ssh-keygen -t ed25519 -C "deploy@$(hostname)" -f ~/.ssh/id_ed25519

# RSA fallback (for older servers that don't support ed25519)
ssh-keygen -t rsa -b 4096 -C "deploy@$(hostname)" -f ~/.ssh/id_rsa

# Install public key on remote host
ssh-copy-id -i ~/.ssh/id_ed25519.pub user@remote-host

# Manual install (when ssh-copy-id isn't available)
cat ~/.ssh/id_ed25519.pub | ssh user@remote-host \
  'mkdir -p ~/.ssh && cat >> ~/.ssh/authorized_keys && chmod 600 ~/.ssh/authorized_keys'

authorized_keys Restrictions

# ~/.ssh/authorized_keys — one line per key, options prefix restricts what the key can do

# Fully restricted key: runs only one command, no forwarding, IP-limited
from="203.0.113.0/24",command="/opt/scripts/deploy.sh",no-port-forwarding,no-X11-forwarding,no-agent-forwarding,no-pty ssh-ed25519 AAAA...

# CI/CD key: command-restricted, no TTY
command="/opt/scripts/ci-commands.sh",no-pty,no-port-forwarding ssh-ed25519 AAAA...

# Regular admin key: IP-restricted only
from="10.8.0.0/24" ssh-ed25519 AAAA...

Read the full file on GitHub · 129 lines

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. 2mo ago First seen · 129 lines · 34 tokens per session scan B b5d9d89155d0

Subscribe to this mod's changes

ssh-hardening is a skill published in the GitHub repository LuuOW/meridian-mcp (0 stars, last pushed 1mo ago), licensed MIT. It adds 34 tokens to every session and 1,033 once invoked, about $0.0001 per session on Opus 5.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

ssh-hardening compared with skills from other repositories

ssh-hardening next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
ssh-hardeningLuuOW/meridian-mcpSkill01mo agoMITB34Claude Code, Codex
frontmcp-configagentfront/frontmcpSkill154todayApache-2.0A187Claude Code
frontmcp-auth-uiagentfront/frontmcpSkill154todayApache-2.0A184Claude Code, Codex
healthcheckJansenAnalytics/claudexSkill55mo agoMITA70Claude Code, Codex
postgresql-indexingprowler-cloud/prowlerSkill15k3d agoApache-2.0A108Claude Code
prowler-apiprowler-cloud/prowlerSkill15k3d agoApache-2.0A61Claude Code
prowler-uiprowler-cloud/prowlerSkill15k3d agoApache-2.0A64Claude Code