ASromancer

Agentssh — Security skill for Claude Code

Security community

SSH for AI coding agents: keys never exposed, deterministic command policy, out-of-band approvals, audit.

How to install Agentssh

This entry records only its repository, not the path inside it, so there is no exact command to give. Open ASromancer/agentssh and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

What Agentssh does

SSH for AI coding agents: keys never exposed, deterministic command policy, out-of-band approvals, audit.

Alternatives in Security

  • OpenTag — Open-source, channel-native agent gateway for Slack 499 ★
  • Security Check — Scan project for security issues — exposed secrets, missing .gitignore entries, unsafe patterns 335 ★
  • Claude Leaked Files — Mirrored snapshot of Claude Code's source (exposed 2026-03-31) preserved for educational purposes, defensive s 256 ★

README

agentssh

SSH for AI coding agents (Claude Code, Codex) without handing them your keys.

  • The agent never sees a private key. Keys live in an encrypted vault; a local daemon holds them in memory and runs commands for the agent.
  • Every command is classified deterministically (no LLM) as read, mutate, destructive or forbidden, by parsing it with a real shell parser (pipes, &&, subshells, $(...), sudo/env/xargs wrappers, bash -c '...').
  • Destructive commands need a human, who approves in a separate terminal with a code from a desktop notification. The approval screen shows the exact command and the risk the tool computed, never the agent's description of it.
  • Forbidden commands are always blocked: reading ~/.ssh, /etc/shadow or sudoers, curl … | sh, reverse shells.
  • Output is compact. Long output keeps the first and last 40 lines; the rest is one agentssh out --grep … away.
  • Everything is audited to a JSONL file.

One static Go binary for Linux, macOS and Windows (amd64, arm64). Apache-2.0.

Install

Download a binary from [Releases](https://github.com/ASromancer/agentssh/releases) and put it on your `PATH`, or:

go install github.com/ASromancer/agentssh@latest
agentssh init        # vault + master key in the OS keyring (or --passphrase), imports ~/.ssh/config,
                     # user service, and the skill + hook for each agent it finds

`init` imports hosts from `~/.ssh/config`, but agents can't see any of them until you enable each one.

agentssh key gen web1-agent             # prints a public key: add it to authorized_keys on the server
agentssh host add web1 --host 10.0.0.5 --user deploy --key web1-agent --agent --desc "nginx + app, production"
agentssh host trust web1                # compare the fingerprint, then pin the host key
agentssh doctor

Use one key per agent, not your personal key. Admin commands (`host`, `key`, `reload`, `approve`, `trust`) must run in a real