AI agents invoke ssh_connect_by_name to trigger actions in Ssh Agent. What it does depends on the arguments the agent supplies, and its effects often reach beyond the immediate call — builds kicked off, notifications sent, workflows started.
Establishing an SSH connection is an active external operation that opens a persistent authenticated session to a remote host. While it is not destructive on its own, it enables arbitrary remote execution and is more than a read/write operation. The blast radius is high because a misused connection can be leveraged to execute commands, transfer files, or cause damage on the remote system.
From the tool's definition ssh_connect_by_name — establishes an SSH connection using a named configuration; sibling tools include ssh_execute which runs commands on remote systems
Attacks that exploit this kind of access
使用配置文件中的连接名称建立SSH连接. It is categorised as a Execute tool in the Ssh Agent MCP Server, which means it can trigger actions or run processes. Use rate limits and argument validation.
Register the Ssh Agent MCP server in PolicyLayer and add a rule for ssh_connect_by_name: allow, deny, rate-limit, or require approval. Point your MCP client at the PolicyLayer proxy URL and the rule is enforced on every call, before it reaches Ssh Agent. Nothing to install.
ssh_connect_by_name is a Execute tool with high risk. Execute tools should be rate-limited and have argument validation enabled.
Yes. Add a rate_limit block to the ssh_connect_by_name rule in your PolicyLayer policy. For example, setting max: 10 and window: 60 limits the tool to 10 calls per minute. Rate limits are tracked per agent session and reset automatically.
Set action: deny in the PolicyLayer policy for ssh_connect_by_name. The AI agent will receive a policy violation error and cannot call the tool. You can also include a reason field to explain why the tool is blocked.
ssh_connect_by_name is provided by the Ssh Agent MCP server (zhijun/ssh-mcp). PolicyLayer sits as a proxy in front of this server to enforce policies before tool calls reach the server.
Every MCP server has a record like this.
Type a name, get the same breakdown: verified identity, auth posture, risk grade, capabilities, recommended policy.
Teams ship this data inside their own products. See what a licence covers →