How to Configure Windsurf SSH Prevent Delete

Published
Length
3 min read

Luis Felipe Dias

All posts

You set up windsurf ssh prevent delete controls by locking down Linux user roles and shell command rules on your remote hosts. You must pair local agent prompts with strict server rules that block file removal commands. Many engineering teams let their coding assistant use a personal SSH key to reach remote machines. When that remote user account has broad write rights, a bad command can wipe out production files in seconds. How windsurf ssh prevent delete works in practice On June 2, 2026, C

SSH Access Management + End-to-End Encryption: 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 windsurf ssh prevent delete controls by locking down Linux user roles and shell command rules on your remote hosts. You must pair local agent prompts with strict server rules that block file removal commands. Many engineering teams let their coding assistant use a personal SSH key to reach remote machines. When that remote user account has broad write rights, a bad command can wipe out production files in seconds.

How windsurf ssh prevent delete works in practice

On June 2, 2026, Cognition renamed Windsurf to Devin Desktop while keeping the same IDE features. The built-in coding agent can run terminal commands on its own with user permission. It opens a dedicated shell that uses zsh on macOS or bash on Linux. That shell loads the local user setup, including saved aliases, paths, and variables. Because it shares your local shell state, the agent can use your active SSH keys to log in to remote servers.

To stop the agent from deleting remote files, teams first limit how the agent logs in. OpenSSH added certificate support in version 5.4 for both users and hosts. An OpenSSH certificate holds a public key, identity data, principal names, and options signed by a Certification Authority key. This format is much simpler than X.509 certificates used in TLS. Teams sign a user certificate for a dedicated read-only principal name on the target Linux host.

Once the agent logs in as that restricted user, Linux file permissions do the heavy lifting. You remove write rights on folders so the account cannot unlink or erase files. Teams also set up a restricted shell or command wrapper on the target host. When the remote daemon sees that specific key or principal, it forces the session through a filter script. That script checks the command string and rejects file removal tools before bash can run them.

Why native SSH and OS permissions leave a gap

Linux permissions and SSH certificates decide who can log in to a host. They do not inspect what individual commands do inside an active interactive session. If an engineer needs the agent to restart a service or write logs, a pure read-only account fails. Teams often grant broader group rights or sudo rules so the agent can finish its task.

Once a user account has write rights to a folder, native SSH cannot tell safe edits apart from file wipes. An agent can bypass a local shell alias by calling the full binary path or using a scripting language like Python. Local IDE permission prompts also put a heavy burden on the developer. Reviewers get tired of reading long command strings and click approve by mistake. Static server rules also break down when you manage dozens of hosts across different cloud accounts. Updating wrapper scripts and folder permissions by hand on every machine takes too much time and leads to drift.

SSH Access Management + End-to-End Encryption: architecture patterns and best practices

Continue reading? Get the full guide.

Free. No spam. Unsubscribe anytime.

How to layer safer controls for AI terminal sessions

Start by separating human SSH keys from the keys your coding agent can reach. Never let the IDE terminal inherit an unlocked SSH agent loaded with root keys. Create a dedicated Linux user on your remote servers just for automated diagnostic tasks. Place that user in a group that can read logs and check process status without owning app folders.

Next, test what happens when the agent tries to remove a test file on a staging host. Verify that both standard delete commands and inline scripts fail to remove data. Keep your allowed command list small so the agent can inspect state without changing disk files. When the agent needs to fix a live issue, require a human to review the exact command and run sensitive steps with clear audit logs.

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 sits inline on the host as an open-source SSH server with guardrails that uses OpenSSH certificates. For every one-shot command or sftp task an agent or human runs in production, hoop.dev decides to pass, mask, block, or escalate it for review.

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

Does Devin Desktop use the same terminal setup as Windsurf?

Yes, Windsurf became Devin Desktop in June 2026 and kept the same IDE features. Its agent runs commands in a dedicated zsh or bash shell that loads your local profile.

Can local shell aliases stop an AI agent from deleting remote files?

No, local aliases only affect your workstation shell and do not carry over into a remote SSH session. Even on a remote host, an agent can bypass an alias by calling the full binary path.

How do OpenSSH certificates help restrict AI agent sessions?

A Certification Authority key signs the certificate with specific principal names and options. You can map that principal to a locked-down Linux account that lacks write access to important folders.

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.