How to Configure Goose SSH Approval

Published
Length
3 min read

Luis Felipe Dias

All posts

You set up goose ssh approval by pairing client prompts with strict server rules. This setup stops an AI agent from running shell commands without a human check. Many teams start by giving the local agent a standard SSH key. That broad key lets the tool log in and run any command as root. One bad prompt can wipe files or break a live service in seconds. Teams need a clear way to review and approve remote actions before they run. How to set up goose ssh approval with native keys A safe setup s

Approval Chains & Escalation + SSH Access Management: the complete guide

Architecture patterns, implementation strategies, and security best practices. Delivered to your inbox.

Free white paper. No spam. Unsubscribe anytime.

You set up goose ssh approval by pairing client prompts with strict server rules. This setup stops an AI agent from running shell commands without a human check. Many teams start by giving the local agent a standard SSH key. That broad key lets the tool log in and run any command as root. One bad prompt can wipe files or break a live service in seconds. Teams need a clear way to review and approve remote actions before they run.

How to set up goose ssh approval with native keys

A safe setup starts with how the agent logs in to remote hosts. Static public keys sit on servers forever and create a wide attack surface. Instead of raw keys, teams can use OpenSSH certificates for user login. A certificate Authority key signs a user public key to make a certificate. That signed certificate holds a public key, an identity string, and valid user principals. It also holds a set of options and a fixed time window.

OpenSSH uses a much simpler format than standard TLS certificates. When you sign a key, you must set a clear time window. By default, a signed OpenSSH certificate lasts forever if you skip the time rule. Setting a short window means the agent cannot use the key tomorrow. On the client side, the agent asks the user before it runs local shell tools. The engineer reads the command on screen and clicks to allow or deny it.

Why client prompts and SSH keys leave a gap

Client approval and short certificates solve two different parts of the problem. The local prompt gives the engineer a chance to stop a bad local call. The signed certificate controls which server the user or agent can log into. Yet a gap remains once the remote shell session opens on the host. To the local agent, the whole SSH call looks like one single command.

Once the engineer approves the login, the remote shell can run many sub-commands. Also, the SSH key lives on the user machine during the task. Any local process or script can read that key and open a back-channel session. Server logs only show that a valid principal logged in at a specific time. They do not show which prompt triggered a command or who approved the step. If a script queries a table and prints emails or phone numbers, the terminal shows it all. Native SSH has no built-in way to rewrite matched fields in results.

Approval Chains & Escalation + SSH Access Management: architecture patterns and best practices

Continue reading? Get the full guide.

Free. No spam. Unsubscribe anytime.

What to review before approving remote agent commands

Before you click approve on any remote command, check three simple things. First, verify the target host name and the remote user role. An agent that only needs to read logs should never log in as root. Second, read the full shell string for chained commands or file writes. Look out for pipes or redirects that send server data to outside hosts.

Third, check what data the command will print back to the agent context. If a command dumps a user file, card numbers or national IDs might enter the chat log. Keep remote commands narrow so they return counts or status codes instead of raw rows. Splitting read tasks from write tasks also makes each approval choice much faster. When a command changes state, require a second team member to review the exact action.

Check SSH commands and file transfers on the host

OpenSSH keys and certificates decide who can log into a Linux host. They do not check what a one-shot command or file transfer does once the session starts. With hoop.dev, you run an open-source SSH server with guardrails on the host. It checks callers with OpenSSH certificates and works with ssh, sftp, scp, and rsync clients.

When a caller runs a one-shot command or moves a file, hoop.dev guardrails check the command or path before it runs. Then hoop.dev data masking masks matched sensitive patterns in downloads and output. Interactive shells carry no guardrails because keystrokes have no statement boundary. Teams can turn interactive shells off and allow only commands and file tasks. The audit trail logs who connected and what was allowed or refused, without storing keystrokes or file bytes. See the source on GitHub.

Frequently asked questions

Does a local agent prompt stop all bad remote commands?

No, a local prompt only checks the first command that starts the SSH client. If the agent opens an interactive shell or runs a remote script, the local tool cannot see each step inside the server.

Why use OpenSSH certificates instead of standard SSH keys for agents?

Standard SSH keys do not expire unless someone removes them from the server file. OpenSSH certificates let you sign a key with a clear identity, user principals, and an expiration time.

How can teams protect sensitive data during remote agent sessions?

Limit the agent to read-only Linux accounts that cannot read private app files. You should also mask output streams so the system rewrites matched fields like emails or card numbers before they reach the model.

Save the open-source gateway.

hoop is MIT-licensed infrastructure for controlling how AI agents reach production data. Star hoophq/hoop so you can inspect it, deploy it, or share it when your team starts governing agent access.