How to Configure Devin SSH MCP Server

Published
Length
3 min read

Luis Felipe Dias

All posts

You set up a devin ssh mcp server by linking the AI agent to your remote Linux hosts through the Model Context Protocol. The tool reads local SSH keys or certificates and runs shell commands on the target machine. Most teams start by giving the agent a standard Linux user account. They drop a static public key onto the host to let the agent log in. If that Linux role has broad rights, the agent can change system files or read private logs. A single bad prompt can then trigger risky commands acro

SSH Bastion Hosts / Jump Servers + Kubernetes API Server Access: 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 devin ssh mcp server by linking the AI agent to your remote Linux hosts through the Model Context Protocol. The tool reads local SSH keys or certificates and runs shell commands on the target machine. Most teams start by giving the agent a standard Linux user account. They drop a static public key onto the host to let the agent log in. If that Linux role has broad rights, the agent can change system files or read private logs. A single bad prompt can then trigger risky commands across your servers.

How a devin ssh mcp server works in practice

The Model Context Protocol gives AI agents a standard way to call external tools. When you add an SSH server tool to Devin, the agent gains a remote shell. Devin forms a command and sends it to the local MCP server process. That process opens an SSH session to your remote Linux host and runs the command. The host sends the text output back to the agent so it can plan its next step.

To log in, the tool relies on standard OpenSSH keys or user certificates. Since OpenSSH 5.4, teams can sign a public key with a Certification Authority key. An OpenSSH certificate holds a public key, identity info, principal names, and a set of options. It uses a much simpler format than X.509 certificates. You can sign a key to make a user certificate and list the allowed user principals. You can also set a time window so the certificate expires on schedule.

Where native SSH keys and roles fall short for AI agents

Native OpenSSH keys and certificates do a great job of checking who logs in. They prove that the MCP tool holds a valid key for a specific Linux user. You can even route traffic through your own jump host or bastion to limit network paths. Still, SSH login stops working the moment the session opens.

Once the agent logs in as a Linux user, it gets every right that user holds. Native SSH setup does not check individual shell commands while they run in flight. If the agent has root or sudo rights to fix an app, it can also delete files. It can read config files that hold secrets or dump user data to the screen. Unfiltered command output may return emails, phone numbers, card numbers, or national IDs to the agent. Static OS roles cannot approve one safe command while blocking a destructive command in the same session.

SSH Bastion Hosts / Jump Servers + Kubernetes API Server Access: architecture patterns and best practices

Continue reading? Get the full guide.

Free. No spam. Unsubscribe anytime.

Scoping Linux roles and command boundaries

To reduce risk with native tools, teams must lock down the target Linux account. You should create a dedicated OS user just for the agent with read-only folder rights. Never give the agent broad sudo rights or share a human admin key. If you use OpenSSH certificates, always set a short validity window when you sign the key. By default, OpenSSH certificates stay valid forever unless you set a time limit. Even with tight OS roles, teams still need a way to inspect and control live commands.

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 provides an open-source SSH server with guardrails on the host that uses OpenSSH certificates.

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

How does Devin authenticate through an SSH MCP server?

The MCP server process uses your local OpenSSH client setup to reach the remote host. It presents a standard SSH private key or a signed OpenSSH user certificate during login. The remote server checks that key against its authorized list or trusted CA key before opening the shell.

Why are static SSH keys risky for AI coding agents?

Static keys stay valid until someone removes them from the remote server. If an agent holds a key tied to a broad Linux role, it can run any command that role allows. The host cannot tell the difference between a safe check and a bad change.

Can OpenSSH certificates limit when an agent logs in?

Yes, you can add a validity time window when you sign a user certificate with your CA key. The certificate will only work during that time window and will fail once it expires. Keep in mind that OpenSSH certificates never expire unless you set this window during signing.

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.