SSH Keys

Lend an agent one key from your own ssh-agent, for one host. The agent never talks to your ssh-agent: it gets a proxy socket that checks every signature against what you allowed, and every signature still goes through HITL.

mur agent ssh allow repo-bot --key SHA256:<key-fp> --host github.com
mur agent ssh list repo-bot
mur agent restart repo-bot

For git, HTTPS is still the simpler choice: gh auth setup-git makes git use gh's HTTPS credential helper and avoids ssh entirely. Use this page when the agent really needs SSH.

Allow

mur agent ssh allow <agent> --key <KEY> [--host <HOST> [--port <PORT>]] [--host-key <FP>] [--label <L>] [--host-label <L>] [--yes]
FlagWhat it does
--keyKey fingerprint (SHA256:..., from ssh-add -l), or a key comment looked up in your ssh-agent and confirmed. The comment is not stored.
--hostHostname to scan for its host key. The key is shown for you to confirm, and a pinned known_hosts entry is written for the agent's ssh. Needs a terminal.
--portPort to scan with --host (default 22).
--host-keyHost key fingerprint you verified out of band. With --host, the scanned key must match it. Alone, no known_hosts entry is written, so the agent's ssh fails host key checking for that host.
--label, --host-labelDisplay only. The proxy matches fingerprints and nothing else.
--yesSkip the confirmation. Needs --key and --host-key as fingerprints; never scans and never adds the ssh spawn grant. --host with --yes is rejected.

allow is the only way to change entitlements.ssh. The agent's profile.yaml, its entitlement pin, and its known_hosts change together or not at all. Editing the profile by hand breaks the pin, and the agent refuses to start.

ssh itself also needs a spawn grant. When it is missing, allow offers to add it (the same as mur agent perm allow-spawn <agent> ssh). If you decline, or there is no terminal, it prints that command instead.

Restart a running agent for the change to take effect.

In scripts

mur agent ssh allow repo-bot --key SHA256:<key-fp> --host-key SHA256:<host-fp> --yes

--yes means "I already know the fingerprints, don't ask". It is not "don't check": MUR never scans a host key for you without a terminal. In murmur, allow --yes runs directly instead of handing over the terminal.

From murmur or MUR Hub

In mur agent cli, /ssh <host[:port]> [user] does the same as allow --host in a card: pick (or ssh-add) a key, compare the scanned host key against your own known_hosts, and Approve writes the grant and restarts the agent once. A changed host key is refused until you paste its fingerprint. When the agent calls ssh_request, the card opens by itself; bare /ssh lists the grants and the requests still waiting.

In MUR Hub, the agent's Permissions tab has an SSH block: the grants with their signing state, the agent's pending ssh_requests in its own words, and Add host, which opens the same key → host → summary card. A pending request also shows in Needs you. When a key is not loaded, the card shows the ssh-add command to run in your terminal and a Check again button; the Hub never asks for a passphrase.

A dedicated key for one agent

Instead of lending one of your own keys, you can give an agent an ed25519 key of its own:

mur agent ssh allow repo-bot --generate --host git.example.com
mur agent ssh allow repo-bot --generate --host git.example.com --install --user deploy
FlagWhat it does
--generateUse the agent's dedicated key instead of --key. It is made the first time and reused after that. Cannot be combined with --key or --yes.
--installAlso append the public key to ~/.ssh/authorized_keys on the host. Needs --host and --user.
--userThe login used for --install. MUR connects with your own keys, not the agent's.

The key is kept at ~/.mur/secrets/ssh/<agent>/id_ed25519 (mode 0600, never overwritten). A sealed agent cannot read secrets/, so the key is offered only to agents that are sandboxed on every run. Each time the agent starts, before the sandbox closes, the runtime starts a private ssh-agent that holds only this key. Its socket is removed as soon as the runtime has connected, so nothing else can open it, sealed or not. The key is never added to your own ssh-agent. The agent's profile must grant the key's fingerprint, or it is not started. If the private ssh-agent cannot start, the agent still starts, and signatures for this key are refused with upstream_unavailable. Unix only.

"Dedicated" means one key for one purpose, kept apart from your keys. It still signs through the same proxy, with the same host filter and HITL as a key you lend. What it buys you is a key that is not in your ssh-agent, and that you can remove from one host's authorized_keys without touching anything else.

If --install fails (wrong login, the host refuses), the grant is still written. The restart waits until you choose: retry the install, copy the authorized_keys line and add it yourself, or restart anyway.

In murmur's /ssh card the key step has a Generate a dedicated key for this agent row. The summary step shows the full authorized_keys line and has an install switch (i). When an install fails, murmur's card offers r retry, y copy line, and Enter to restart anyway; MUR Hub's card has Retry install, Copy line and Restart anyway.

To turn the feature off, set this in ~/.mur/config.yaml:

ssh_setup:
  generate_key: false

That stops new keys and installs. A key that already exists is still used at start. mur agent remove --purge deletes the key directory along with the agent (and drops any copy an older MUR left in your ssh-agent); plain mur agent remove keeps the key, as it keeps the agent's data. Renaming an agent moves its key.

Revoke and list

mur agent ssh revoke <agent> --key SHA256:<key-fp> --host-key SHA256:<host-fp>
mur agent ssh revoke <agent> --key SHA256:<key-fp>       # every host for this key
mur agent ssh list <agent> [--json]

With both --key and --host-key, revoke removes one pair. With only one of them, it removes every pair it names, and asks first (--yes skips the question). list --json prints the entitlements.ssh block.

What the proxy checks

Each sign request must match:

  1. a key you allowed,
  2. the host key the ssh client verified for this connection (session-bind), allowed for that key,
  3. the same SSH session that bind belongs to,

and then pass HITL. Any error refuses the signature; there is no passthrough. The ssh client only sees a generic failure, so the reason is posted to the agent's channel and listed under ssh_proxy refusals in mur agent status, each with a code. The ones you are most likely to see:

CodeMeaning
key_not_allowedThe key is not allowed for this agent.
host_not_allowedThe key is allowed, but not for this host key.
upstream_unavailableYour ssh-agent was unset or unreachable when the agent started.
hitl_denied / hitl_deferredYou said no, or nobody has answered yet.
sign_data_not_userauthA commit or file signature, which v1 does not support.
forwarding_not_supportedssh -A.

Is it a boundary for this agent?

mur agent status says so on one line:

StatusMeaning
ssh_proxy: boundaryThe agent cannot reach your ssh-agent socket. The proxy is the only way to get a signature.
ssh_proxy: audit-only (<reason>)MUR has not established that your ssh-agent socket is unreachable from the agent: either it is reachable, or the check could not tell. The proxy's checks and HITL still apply to requests sent through it, but direct access to your ssh-agent may bypass them.
ssh_proxy: off (<reason>)The proxy did not start.

The <reason> codes are stable identifiers; the same code appears in the agent's channel and in mur agent status:

ReasonMeaning
platform_no_fs_sandboxWindows or another platform with no filesystem sandbox that could gate the socket.
platform_no_unix_socket_controlLinux: Landlock does not mediate connect(2) on pathname unix sockets.
unrestricted_networkThe agent's profile has no outbound network deny, so nothing stops it reaching the socket.
upstream_unresolvedYour ssh-agent socket path could not be canonicalised, so it cannot be compared against the sandbox allowlist.
upstream_in_allowlistYour ssh-agent socket is in a directory the sandbox allows.
upstream_matches_allow_patternYour ssh-agent socket matches the sandbox's allowed MUR short-socket pattern.
probe_reachableThe reachability check connected to your ssh-agent from inside the agent's profile.
probe_inconclusiveThe reachability check timed out or failed, so MUR does not claim a boundary.
supervisor_not_enforcingThe check itself was confined, but the agent's own sandbox did not install or is advisory-only, so the agent is not held to the profile the check measured.

Every uncertain case resolves to audit-only: the dangerous error is claiming isolation that does not exist. There is no setting to hide this line.

Known limitations

  • Keys stay in your existing ssh-agent. Key filtering is only as strong as that socket's unreachability from the sandbox.
  • Agents with unrestricted network: audit-only.
  • Linux: audit-only.
  • Windows: the proxy does not start, and is never a boundary.
  • Detection covers only the upstream socket the proxy uses. If you point SSH_AUTH_SOCK elsewhere after the agent starts, that is not re-checked.
  • Destination-constrained keys (ssh-add -h) cannot sign through the proxy. They still show up in ssh-add -l, so the failure appears at sign time.
  • SSH signing of commits and files (ssh-keygen -Y sign, git commit signing) is refused with sign_data_not_userauth.
  • Agent forwarding (ssh -A) is refused with forwarding_not_supported.
  • ProxyJump works, but every hop's host key must be allowed for that key.
  • Only ssh run from the agent's bash and git (through GIT_SSH_COMMAND) get the pinned known_hosts. An absolute-path ssh, or a tool with its own SSH client, fails host key checking unless it turns checking off. If it does, the proxy's session check still decides.
  • When a server rotates its host key, connections fail until you run mur agent ssh allow --host again.
  • The dedicated key's private ssh-agent needs OpenSSH's ssh-agent and ssh-add on PATH, and is Unix only.