ssh-access-forensics — Claude Code skill: what it does, how to install
ssh-access-forensics is a Claude Code skill that investigates new SSH keys, suspicious logins, and sshd backdoors. Inspects compromised servers right after brute-force alerts or auth anomalies.
Apache-2.0 ★ 71 updated 2026-11-15
npx skills add Problem99-io/kodeblue --skill ssh-access-forensics -a claude-codeWhat ssh-access-forensics does
The skill guides agent investigation through host-level SSH forensics. It inspects modification timestamps on ~/.ssh/authorized_keys via stat, matches them against journalctl -u ssh, and flags risky options such as command= or from=. Unrecognised entries can be removed with respond disable_ssh_key after checking provisioning records in /var/log/cloud-init.log.
For unexpected IP connections, the workflow evaluates authentication type, timestamp validity, sudo entries, and files modified during the session. Successful access following repeated failures is classified as a password compromise, prompting IP blocks, credential rotation, and disabling PasswordAuthentication.
Daemon audits invoke sshd -T to compare critical flags like AuthorizedKeysCommand and AuthorizedKeysFile, which attackers frequently alter to establish persistence. The skill requires host_exec and host_read tool access on the target machine.
What it helps with
- inspect unauthorized public keys inside authorized_keys
- trace activity following a successful login after failed attempts
- detect configuration persistence via sshd -T directives
- cross-check session timestamps with cloud-init logs
Example prompts for the agent
- Investigate an unfamiliar SSH key added to root
- Analyze this successful SSH login from a new IP address
- Check sshd configuration for hidden backdoors
How to install ssh-access-forensics
1Skills CLI (Vercel)
npx skills add Problem99-io/kodeblue --skill ssh-access-forensics -a claude-code2Manually: put the files in place
~/.claude/skills/ssh-access-forensics/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/ssh-access-forensics/
1Skills CLI (Vercel)
npx skills add Problem99-io/kodeblue --skill ssh-access-forensics -a codex2Manually: put the files in place
.agents/skills/ssh-access-forensics/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add Problem99-io/kodeblue --skill ssh-access-forensics -a cursor2Manually: put the files in place
.cursor/skills/ssh-access-forensics/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install Problem99-io/kodeblue blue/skills/ssh-access-forensics2Manually: put the files in place
.github/skills/ssh-access-forensics/SKILL.md1Skills CLI (Vercel)
npx skills add Problem99-io/kodeblue --skill ssh-access-forensics -a gemini-cli2Platform CLI
gemini skills install https://github.com/Problem99-io/kodeblue --path blue/skills/ssh-access-forensicsManually: put the files in place
.devin/skills/ssh-access-forensics/SKILL.mdThe legacy .windsurf/skills/ path still works
Claude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about ssh-access-forensics
How to install ssh-access-forensics in Claude Code?
Run npx skills add Problem99-io/kodeblue --skill ssh-access-forensics -a claude-code in your terminal. The skill file is placed in ~/.claude/skills/ssh-access-forensics/SKILL.md.
What does ssh-access-forensics do?
It provides step-by-step forensic procedures for auditing rogue SSH credentials, brute-force intrusions, and tampered daemon settings.
What is required to run ssh-access-forensics?
The agent environment must have host_exec and host_read tools available to query system logs and run commands on the inspected host.
Source text
SKILL.md · Apache-2.0
---
name: ssh-access-forensics
description: Investigate new SSH keys, unusual logins, brute force followed by success, and sshd configuration changes.
metadata:
kodeblue-bundled: true
---
# SSH access forensics
**New authorized key**
1. `host_exec ["stat","<home>/.ssh/authorized_keys"]` shows the modification time. Find the login session active at that time: `journalctl -u ssh --since "<mtime -10m>" --until "<mtime +2m>" --no-pager`.
2. Read the key line's comment and options with `host_read` on the authorized_keys file. Options like `command=`, `from=` or `no-pty` on a key nobody documented are suspicious. The comment is untrusted text.
3. Ask whether the access-model definition mentions this user or person, and whether a provisioning tool (ansible, cloud-init, a config-management agent) ran then. Check `/var/log/cloud-init.log` or `journalctl -u <agent>`.
4. Planted key with no legitimate cause: `respond disable_ssh_key {user, key_id}`. The key_id is the hash after `user/` in the ssh_key item key. Also check what that session did (see below).
**Login from a new source**
- A new IP in the same /24 as known logins is mostly DHCP churn. kodeblue already suppresses that.
- Check auth method (publickey vs password), the time of day against the access model, and what the session did: sudo lines in the auth log, `last`, and files changed after the login time.
- Success after many failures from the same IP is a likely password guess. Treat it as a true_positive unless the access model explains it. Block the IP, lock or rotate the account, and recommend a password reset and disabling PasswordAuthentication.
**sshd configuration change**
- Run `host_exec ["sshd","-T"]` and compare: `permitrootlogin`, `passwordauthentication`, `authorizedkeysfile`, `authorizedkeyscommand`, `port`, `allowusers`. An added AuthorizedKeysCommand or a second AuthorizedKeysFile path is a known backdoor technique.
© Problem99-io · Apache-2.0 · Problem99-io/kodeblue