How to Configure Goose SSH Read Only Access

Published
Length
3 min read

Luis Felipe Dias

All posts

You set up goose ssh read only access by pairing restricted Linux users with OpenSSH certificates. The agent logs in with a scoped key and runs safe check commands on target hosts. Teams often start by giving the local agent their own personal SSH keys. That choice gives an automated tool full write rights across production servers. One bad prompt can then delete files, stop services, or expose sensitive data. How to set up goose ssh read only access on Linux hosts A safe setup starts on the

Auditor Read-Only Access + 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 read only access by pairing restricted Linux users with OpenSSH certificates. The agent logs in with a scoped key and runs safe check commands on target hosts. Teams often start by giving the local agent their own personal SSH keys. That choice gives an automated tool full write rights across production servers. One bad prompt can then delete files, stop services, or expose sensitive data.

How to set up goose ssh read only access on Linux hosts

A safe setup starts on the target Linux server. You create a dedicated user account just for the AI agent. You do not add this user to admin groups or grant root rights. Next, you place this user into specific groups that can read system logs. You also use Linux file permissions to block write actions on app folders.

After you set up the OS account, you manage how the agent logs in. Static SSH keys are hard to track and never expire on their own. OpenSSH certificates offer a simpler format than X.509 certificates for user login. You use a Certification Authority key to sign the public key of the agent. The signed certificate holds the public key, identity info, principal names, and options. You also set a short validity window when you sign the certificate. By default, OpenSSH certificates remain valid forever unless you set a time limit. The target server trusts the CA key and lets the matching principal log in.

Why OS accounts and SSH certificates are not enough

Linux permissions and OpenSSH certificates solve the login problem well. They decide which user can log in and when the key expires. Still, SSH is a raw shell protocol, not a structured query language. Once a session starts, the OS only checks file access bits on disk. It does not judge the intent of individual commands in flight.

A read-only user can still read sensitive files that hold world-readable permissions. For example, the agent might read app configs or dump text logs with user emails. It could also run heavy find commands that spike server CPU usage. OpenSSH certificates can restrict a session to a single forced command on the host. Yet an AI agent needs to run many different check commands to fix an issue. Maintainers then face a hard choice between a rigid script and an open shell. Native SSH tools also do not rewrite sensitive fields like phone numbers in command output.

Auditor Read-Only Access + SSH Access Management: architecture patterns and best practices

Continue reading? Get the full guide.

Free. No spam. Unsubscribe anytime.

Managing agent shell commands in flight

To keep AI agents safe, teams must inspect commands before the server runs them. You should separate the login check from the command check. The agent should never hold raw SSH keys on a developer laptop. Instead, each command should pass through a review step that checks the exact text. High-risk commands can wait for a human to approve them in chat. At the same time, data masking can rewrite card numbers or national IDs in results. This setup lets the agent check server state while keeping production systems safe.

Add command and file guardrails to SSH access

Host firewalls and certificate principals control who opens an SSH session. Yet an allowed user or agent can still run a bad one-shot command or pull sensitive files over sftp. In practice, hoop.dev provides an open-source SSH server with guardrails on the host that uses OpenSSH certificates.

Using hoop.dev SSH controls, guardrails check one-shot commands, env variable names, and sftp or scp paths before they run. Port forwards default to deny unless the target is listed. Because interactive shells have no statement boundary and carry no guardrails, teams can turn them off so every command is checked and logged. Check out the MIT-licensed project on GitHub.

Frequently asked questions

Can OpenSSH certificates make an SSH session read-only by themselves?

No, OpenSSH certificates only handle user login, principal names, and session options. You must combine them with Linux file permissions or command checks to block write actions.

Why should we avoid giving Goose our personal SSH keys?

Personal keys usually carry admin rights and wide network reach. If the agent makes a mistake, it can change configs or restart services using your identity.

How do we stop an SSH agent from reading private data in logs?

Linux file permissions work at the whole file level, not the line level. To hide emails or card numbers inside readable logs, you need output masking in flight.

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.