How to Configure Windsurf SSH Sandbox

Published
Length
3 min read

Luis Felipe Dias

All posts

You set up a windsurf ssh sandbox by routing the agent's shell through a restricted remote host. This setup uses OpenSSH certificates and tight server rules to limit what the AI can run. Teams often give coding agents their own local keys to speed up remote tasks. When those keys have broad roles, a bad prompt can delete files or expose secrets. How a windsurf ssh sandbox works in practice Cognition renamed Windsurf to Devin Desktop in June 2026, while keeping the same IDE features. Its agent

SSH Access Management + AI Sandbox Environments: 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 a windsurf ssh sandbox by routing the agent's shell through a restricted remote host. This setup uses OpenSSH certificates and tight server rules to limit what the AI can run. Teams often give coding agents their own local keys to speed up remote tasks. When those keys have broad roles, a bad prompt can delete files or expose secrets.

How a windsurf ssh sandbox works in practice

Cognition renamed Windsurf to Devin Desktop in June 2026, while keeping the same IDE features. Its agent can run terminal commands on its own after you give it permission. The app opens a dedicated shell that loads your normal local shell profile. Because it reads your profile, the agent inherits your aliases, variables, and local SSH keys.

To build a windsurf ssh sandbox, you must separate the agent from your primary keys. You start by setting up a jump host or an isolated container target for the agent. Instead of static keys, you can use OpenSSH user certificates signed by a Certification Authority key. OpenSSH added certificate support in version 5.4 to offer a simpler format than X.509.

Each signed certificate holds a public key, identity text, principal names, and specific runtime options. You create a distinct user account on the remote sandbox host just for the AI agent. The host checks the CA signature and maps the agent to that restricted principal name. This keeps the coding agent out of your root account and personal developer files.

Managing agent shell permissions on the remote host

Once the agent logs in to the remote host, Linux user rules take over. You place the sandbox user in a locked-down group with read-only permissions on core folders. You also give it a small scratch folder where it can write and test code. If the agent tries to edit system files, the operating system blocks the write action.

You must also clean up the local shell profile that the IDE loads at startup. If your shell profile holds cloud tokens or database passwords, the agent can read them. Moving those variables out of the default profile stops the agent from sending them over SSH. You give the agent a clean shell that only knows how to reach the sandbox.

SSH Access Management + AI Sandbox Environments: architecture patterns and best practices

Continue reading? Get the full guide.

Free. No spam. Unsubscribe anytime.

What native SSH sandboxing solves and what it misses

A native OpenSSH sandbox solves the problem of broad server access across your network. It decides who can log in and which host folders that user can touch. Using signed certificates also lets you set a time limit on the login key. By default, OpenSSH certificates last forever unless you set a validity window when signing.

Still, host login rules do not inspect what individual commands do once the shell starts. If the sandbox user has permission to query a test database, it can pull all rows by default. Native SSH does not rewrite sensitive fields like emails, phone numbers, or card numbers in results. It also cannot pause a single risky command inside an active session for human review.

Standard server logs only show that the sandbox user logged in and opened a shell. Auditing every single command and output stream across many developer machines takes extra work. Teams still need a way to watch live commands and filter sensitive data in flight.

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 inline open-source SSH listener on the host where engineers and AI agents keep their normal ssh, sftp, and scp tools. On every production command or file operation, hoop.dev decides whether to pass, mask, block, or hold it for approval.

First, hoop.dev guardrails check one-shot commands and file paths before they run, and 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 does the Windsurf agent have access to my local SSH keys?

The agent runs commands inside a dedicated terminal that loads your standard shell profile. Any SSH agent sockets, keys, or variables in that profile become available to the AI.

How do OpenSSH certificates help isolate an AI coding agent?

A Certification Authority key signs the agent's public key with a specific identity and principal name. The remote server trusts the CA and restricts the agent to that single sandbox account.

Can native SSH rules stop an agent from reading sensitive data inside a allowed folder?

No, Linux file permissions and SSH rules only control login and file access at a broad level. Once a file or database is readable, native SSH cannot mask emails or card numbers inside the output.

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.