How to Configure Haystack SSH Approval
You set up haystack ssh approval by pairing agent tool checkpoints with OpenSSH keys. This setup pauses remote server tasks until a human reviewer clears the request. Teams often give AI pipelines static keys and wide host roles to run fast. Broad permissions let an automated pipeline run bad commands on production servers. How haystack ssh approval works with OpenSSH Haystack pipelines often need to run diagnostic scripts on remote Linux hosts. Instead of giving an agent open shell access, t
Approval Chains & Escalation + SSH Access Management: the complete guide
Architecture patterns, implementation strategies, and security best practices. Delivered to your inbox.
You set up haystack ssh approval by pairing agent tool checkpoints with OpenSSH keys. This setup pauses remote server tasks until a human reviewer clears the request. Teams often give AI pipelines static keys and wide host roles to run fast. Broad permissions let an automated pipeline run bad commands on production servers.
How haystack ssh approval works with OpenSSH
Haystack pipelines often need to run diagnostic scripts on remote Linux hosts. Instead of giving an agent open shell access, teams build a review step. When the pipeline picks a remote tool, the workflow stops and sends an alert. A reviewer checks the target host and the planned task before clicking approve.
On the server side, teams replace static public keys with OpenSSH certificates. A Certificate Authority key signs a user public key to make a certificate. Each certificate holds a public key, identity info, principal names, and specific options. OpenSSH certificates use a much simpler format than standard TLS certificates.
When a reviewer approves a pipeline request, the system signs a user certificate. The signing tool sets a key identity and lists allowed user or host principals. It also sets a short time window so the key does not last forever. The Haystack node then logs in to the remote host using that signed certificate.
What native setup solves and what it misses
Combining workflow prompts with OpenSSH certificates solves the problem of shared static keys. Admins no longer need to copy public keys to every remote server by hand. If an agent finishes its job, the certificate expires after its time window ends. This setup controls which pipeline can log in to a host and when.
Still, entry checks only decide who logs in to the remote machine. Once the SSH session opens, the certificate does not check each command in flight. If a pipeline gets a shell session, it can run several commands at once. A reviewer who approved a log check cannot stop a sudden file change.
Native OpenSSH logs also focus on login events rather than full command output. Teams cannot easily mask sensitive text like emails, phone numbers, or card numbers. If a remote script prints national IDs, that raw text enters the pipeline context. Masking tools that rewrite matched fields in results are missing from basic SSH setups.
Approval Chains & Escalation + SSH Access Management: architecture patterns and best practices
Continue reading? Get the full guide.
Free. No spam. Unsubscribe anytime.
Reducing risk in automated remote sessions
To keep production hosts safe, teams must separate login rights from command rights. Rather than approving a full shell session, reviewers should approve one task at a time. Each remote call should state the exact script it plans to run. The review step must show both the server name and the exact command text.
Teams should also limit the Linux user account that the pipeline uses. Create a dedicated host role with read-only permissions for diagnostic tasks. Never map an automated agent principal to the root account on a production machine. Keep the certificate validity window down to a few minutes for every single task.
Finally, treat all text returning from a remote SSH session as untrusted data. Remote logs often contain customer emails or card numbers from failed app requests. Filter the command output before the Haystack pipeline sends it to a language model. Rewriting sensitive fields in the output keeps private records out of external model prompts.
Inspect one-shot SSH commands and file tasks
SSH certificates and host rules decide who is allowed on a machine. Setup alone does not check single commands or block sftp reads on sensitive paths. By design, hoop.dev runs an open-source SSH listener on the host where people and agents keep their normal ssh, sftp, and scp tools.
First, hoop.dev guardrails check one-shot commands and file paths before they run. Next, hoop.dev data masking masks matched values in file downloads. The audit trail logs the certificate principal, requested action, and verdict without storing session content. Interactive shells carry no guardrails and can be turned off when every action must be checked. Explore the code on GitHub.
Frequently asked questions
Why use OpenSSH certificates instead of static keys for Haystack agents?
Static keys stay valid until someone removes them from the target server. OpenSSH certificates include a built-in time window and expire on their own after use.
Does approving an SSH login restrict what commands the agent runs?
No, a standard login check only grants entry to the remote host. Unless you restrict the command, the session can run any script the Linux role allows.
How can teams protect sensitive data in SSH command output?
Teams should pass session results through a filter that rewrites matched fields. This step replaces emails, phone numbers, and card numbers before the agent reads the output.
Related guides
In this post