Skip to main content
Glama

ssh_exec

Execute a single command on a remote host over SSH using password or key authentication, returning stdout, stderr, and exit code.

Instructions

Execute a single command via SSH (uses paramiko, no sshpass dependency). host: target IP or hostname username: SSH username password: SSH password (leave empty if using key) key_file: path to private key file (leave empty if using password) command: shell command to execute port: SSH port (default 22) timeout: command timeout in seconds (default 60) Returns: stdout, stderr, return_code (or error if connection/auth failed)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
hostYes
portNo
commandNoid
timeoutNo
key_fileNo
passwordNo
usernameYes
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full responsibility for behavioral disclosure. It states that it uses paramiko and does not require sshpass, informs the user of return values (stdout, stderr, return_code), and mentions error handling for connection/auth failures. This is meaningful behavioral context beyond what the schema provides, though it does not cover host key verification or what happens if both password and key_file are provided.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concise and well-structured: one lead sentence defining the tool, followed by a list of parameters with brief explanations, and a final line for return values. Every line earns its place, with no fluff or redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's moderate complexity (7 params), lack of output schema, and absence of annotations, the description provides sufficient context: purpose, all parameters with defaults, and expected return values. It does not explain the absence of interactive features or potential security implications of running arbitrary commands, but these are largely implicit. It is nearly complete for its scope.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate. It lists all 7 parameters with meaningful context: 'password: SSH password (leave empty if using key)' and 'key_file: path to private key file (leave empty if using password)' clarify mutual exclusivity, while defaults for port and timeout are restated. This exceeds what the schema titles provide.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description begins with 'Execute a single command via SSH', a specific verb-resource pair that clearly distinguishes it from sibling tools like ssh_enum_privesc (which enumerates privilege escalation) and hydra_bruteforce (which brute-forces credentials). The qualifier 'single command' also differentiates it from any interactive SSH session tool.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description states when to use it: to execute a single command via SSH. However, it provides no explicit exclusions or alternatives (e.g., 'for interactive sessions use X' or 'if you need to enumerate privileges, use ssh_enum_privesc'). The context is clear but without comparative guidance, it earns a middle score.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Neeraj829784/kali-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server