How to Configure Cline SSH Approval
You set up cline ssh approval by turning on command confirmation in your editor. Then you pair the agent with OpenSSH user certificates on your remote hosts. Many engineering teams start by giving their coding agent full terminal rights. The agent uses local SSH keys to log in to remote Linux servers. When permissions are too broad, the agent can run bad commands right away. One wrong prompt can delete files or expose secret data on production machines. How cline ssh approval works with OpenSS
Approval Chains & Escalation + SSH Access Management: the complete guide
Architecture patterns, implementation strategies, and security best practices. Delivered to your inbox.
You set up cline ssh approval by turning on command confirmation in your editor. Then you pair the agent with OpenSSH user certificates on your remote hosts. Many engineering teams start by giving their coding agent full terminal rights. The agent uses local SSH keys to log in to remote Linux servers. When permissions are too broad, the agent can run bad commands right away. One wrong prompt can delete files or expose secret data on production machines.
How cline ssh approval works with OpenSSH
Cline runs as an agent inside your code editor. It can write code and run terminal commands on your local machine. When it needs to fix a remote server, it calls your local SSH client. Without approval rules, the agent runs remote shell commands on its own.
To control this flow, you first enable manual approval inside the agent settings. This rule forces the agent to pause before it runs any terminal command. It shows you the exact SSH string and waits for your click. If you turn on auto-approve for safe read tasks, keep SSH off that list. Every remote shell call should wait for a human to check it first.
Local prompts in your editor are only half of the setup. The agent still uses the SSH keys stored on your laptop. If a key has no time limit, any approved command gets full server entry. You can improve this by using OpenSSH certificates instead of static public keys. Certificate sign-in for users and hosts arrived in OpenSSH 5.4. It uses a much simpler format than standard web TLS certificates.
In an OpenSSH setup, a central authority key signs a user public key. The signed certificate holds the public key, user identity, and valid principal names. It also holds a set of options and a fixed time window. When the agent runs an SSH command, the remote server checks the certificate. If the time window has passed, the server blocks the login right away.
Where native agent prompts fall short in production
Local agent approval and OpenSSH certificates solve the basic login problem. The editor prompt stops the agent from starting a remote session in secret. The OpenSSH certificate makes sure the local key expires after a short shift. Together, they verify who logs in from the developer laptop.
Still, this native setup leaves a big gap during daily work. A local prompt only checks the command string before it leaves the laptop. Developers get tired when they read dozens of long shell commands every hour. It is easy to click approve on a script that hides a bad step. Once the session starts, the remote host trusts the local user account.
Approval Chains & Escalation + SSH Access Management: architecture patterns and best practices
Continue reading? Get the full guide.
Free. No spam. Unsubscribe anytime.
OpenSSH certificates also do not watch what happens inside an active session. They decide who can log in, not what individual commands do in flight. If the remote user role has broad rights, the agent inherits those rights. The agent can read live tables and pull emails or card numbers into chat. Even if data masking rewrites matched fields in results elsewhere, raw shell output bypasses it. Local editor logs also stay on the developer laptop. Security teams cannot see which prompts led to which remote server changes.
Steps to harden remote agent workflows
First, separate read actions from write actions on your target Linux hosts. Give the agent a limited Unix principal name that can only read logs. Never let an automated coding tool use a root key or admin role.
Second, require human sign-off for every command that opens a remote network session. Do not let the agent chain local builds with remote scripts in one step. Breaking tasks into small parts makes each prompt much easier to read and check.
Third, move away from long-lived keys sitting in local home folders. Require a fresh certificate sign-in before the start of any maintenance task. When the task finishes, revoke the session so no background process keeps the session active. Keep a central log of every remote command that runs across your servers. Make sure your team reviews these logs often to spot risky agent habits.
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 Cline run SSH commands without asking me first?
Yes, if you turn on auto-approval for terminal execution in your editor settings. To prevent this, keep manual confirmation active for all shell and network commands.
Does an OpenSSH certificate stop an agent from running destructive commands?
No, a certificate mainly checks identity and login options when the session starts. Once logged in, the agent can run any command allowed for that Unix user.
How do I keep my agent from reading sensitive user data over SSH?
Restrict the remote Unix account so it cannot read private folders or database files. You can also add data masking that rewrites matched fields in results like phone numbers.
Related guides
In this post