How to Configure Goose SSH Audit Log
You set up a goose ssh audit log by combining local agent history with server SSH logs. This setup tracks when the AI agent logs in and which remote hosts it reaches. Teams often give an AI agent a standard SSH key to run remote tasks. Broad keys let the agent run any command on the target host without strict limits. If a prompt goes wrong, the agent might change files or read private data. How a goose ssh audit log works in native setups Goose runs on a local machine or a build server as an
Audit Log Integrity + SSH Access Management: the complete guide
Architecture patterns, implementation strategies, and security best practices. Delivered to your inbox.
You set up a goose ssh audit log by combining local agent history with server SSH logs. This setup tracks when the AI agent logs in and which remote hosts it reaches. Teams often give an AI agent a standard SSH key to run remote tasks. Broad keys let the agent run any command on the target host without strict limits. If a prompt goes wrong, the agent might change files or read private data.
How a goose ssh audit log works in native setups
Goose runs on a local machine or a build server as an autonomous coding agent. It uses your local SSH client to reach remote Linux servers and run shell commands. When the agent connects, the remote OpenSSH daemon checks the key and writes login events. These events go into the system auth log on the remote machine.
To improve identity tracking, teams can use OpenSSH certificates instead of static keys. A certificate authority signs a public key and adds an identity string and principal names. OpenSSH added this simpler certificate format in version 5.4 to replace plain keys. When the agent logs in with a certificate, the server records the signed key identity. You can also route agent traffic through a central bastion or jump host. The jump host collects login records in one place so you do not check every server.
What native SSH logs solve and what they miss
Native OpenSSH logs and certificates tell you who logged in and when the session started. They prove which key or certificate opened the connection to the remote host. If you set a short certificate life, you also limit how long a key works. By default, OpenSSH certificates last forever unless you set a time window during signing.
Still, standard SSH daemon logs only track the front door. Once the login succeeds, the SSH daemon hands the session over to the system shell. Standard login logs do not show every command the AI agent runs inside that shell. They also do not show the text output that returns to the agent. If a shell command prints customer emails, phone numbers, card numbers, or national IDs, native SSH logs cannot rewrite those fields. Also, native SSH rules cannot pause a risky command for human approval mid-session. You know the agent entered the server, but you cannot govern individual commands in flight.
Audit Log Integrity + SSH Access Management: architecture patterns and best practices
Continue reading? Get the full guide.
Free. No spam. Unsubscribe anytime.
Why agent shell sessions need command-level control
Human engineers read prompts and think before they run a destructive script on a host. An AI coding agent generates and runs shell commands at machine speed based on context. If an error occurs, the agent will try new commands right away to fix it. Relying on host-level login logs means you only find bad commands after they finish.
Collecting shell history files from remote hosts is also unreliable for audit trails. An agent with broad shell rights can alter or delete local history files during a run. True control requires capturing every command and output stream before it hits the host or returns to the model. Masking rules that rewrite matched fields in results help keep sensitive strings out of model prompts.
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 OpenSSH log every command that Goose runs by default?
No, standard OpenSSH server logs record login checks, key details, and session start times. They do not record the full text of shell commands or standard output inside the session.
How do OpenSSH certificates help with agent audit logs?
An OpenSSH certificate includes a signed identity string and valid user or host principals. The remote server writes this identity to the auth log so you know which agent connected.
Can native SSH settings hide sensitive data from an AI agent?
No, SSH encrypts traffic on the network, but it delivers raw command output to the client. You need inline data masking to rewrite emails or card numbers in command results.
Related guides
In this post