How to Configure Cursor SSH Read Only Access

Published
Length
3 min read

Luis Felipe Dias

All posts

You set up cursor ssh read only access by pairing a restricted Linux user with an OpenSSH certificate. Then you point the AI editor to that host profile so it can inspect files without changing them. Many engineering teams start by giving their code editor a personal SSH key with root rights. That broad setup lets an automated agent delete files, restart services, or leak secrets during a debugging task. Scoping the remote shell down to read operations protects production hosts while still letti

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 cursor ssh read only access by pairing a restricted Linux user with an OpenSSH certificate. Then you point the AI editor to that host profile so it can inspect files without changing them. Many engineering teams start by giving their code editor a personal SSH key with root rights. That broad setup lets an automated agent delete files, restart services, or leak secrets during a debugging task. Scoping the remote shell down to read operations protects production hosts while still letting developers read logs.

How cursor ssh read only access works on Linux hosts

To build cursor ssh read only access, you must control both the SSH login and the remote shell. OpenSSH does not have a single read-only toggle for interactive sessions. Instead, the editor opens a normal SSH tunnel to the remote machine and runs helper scripts or commands. If the remote Linux account has write rights on a folder, the editor can change those files.

Start by creating a dedicated Linux user on the target host for inspection tasks. Do not add this user to admin groups or grant sudo permissions. Give the account read permissions on the log directories and app folders the team needs to check. Remove write permissions on all system paths, config folders, and data volumes.

Next, replace static public keys with OpenSSH user certificates signed by a Certification Authority key. OpenSSH added certificate support for users and hosts in version 5.4. A signed certificate holds a public key, identity info, principal names, and options in a simple format. Signing keys with a CA lets you set a short time window instead of leaving keys active forever. You can also attach certificate options that restrict what the session can do after login.

Why remote development agents break simple shell rules

Standard SSH command restrictions often clash with how AI code editors work on remote hosts. When a tool connects over SSH for full remote editing, it usually installs a small server binary. That helper process needs write access to its own home folder to store temporary files and sockets. If you lock down the entire filesystem or force a single static command, the editor will fail to start.

Because of this, teams often allow a full shell in the user home directory. They rely on Linux file permissions to block writes everywhere else on the server. This native setup solves basic file tampering, since the OS blocks the user from editing system files. It also keeps the AI agent from restarting background jobs or changing network settings.

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

Continue reading? Get the full guide.

Free. No spam. Unsubscribe anytime.

The operational gap in native SSH permissions

Linux file permissions decide who logs in and which files they can open. They do not inspect what individual commands do in flight or what data leaves the host. A read-only Linux user can still run a shell command that dumps sensitive customer tables or local secrets. Once the agent reads a file, the raw text flows straight back into the editor prompt.

If a log file contains emails, phone numbers, card numbers, or national IDs, the agent reads them all. Native OpenSSH cannot rewrite matched fields in results before they reach the developer machine. Also, standard host logs only show that an SSH session happened, not every command the agent ran. Teams need a clearer way to control commands and mask sensitive fields in real time.

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

Can OpenSSH block write commands by itself?

OpenSSH can force a single command per key or certificate, which blocks open shell use. Still, once OpenSSH opens an interactive shell, the Linux kernel controls file writes through user permissions.

Why do remote AI editors need write access to a home folder?

Most remote editors copy a small server agent to the host when they first log in. That agent needs a writable folder to unpack its files, open local sockets, and track session state.

How do OpenSSH certificates improve AI agent security?

OpenSSH certificates let you sign a user key with an identity, principal names, and an expiration time. When the time window ends, the agent can no longer log in to the host.

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.