Skip to main content
Glama
QiuwenZheng

interminal

by QiuwenZheng

connect_ssh

Open a persistent SSH connection with automatic host key acceptance, returning a session ID for executing commands. Supports key-based, password, and agent authentication with fallback.

Instructions

Opens a persistent SSH connection and returns a session_id for use with
`execute`. The connection stays open until `disconnect`. Host keys are
auto-accepted. For local commands, call `execute` directly — no session needed.

PARAMETER GUIDANCE: Reuse session_id across multiple execute calls —
each connect_ssh opens a new TCP connection. key_filepath is tried
first when both key and password are provided; password acts as
fallback. With neither, SSH agent and system defaults are used. The
username defaults to the OS user if omitted. host is resolved at
connect time; unresolvable names raise an error. banner_timeout
controls MOTD capture — if exceeded, banner returns "" (not an error);
set to 0 to skip capture entirely.

SIDE EFFECTS: Opens a TCP socket with a 30-second keepalive. Leaks
the socket if `disconnect` is never called.

ERRORS: Raises on auth failure, unresolvable host, refused connection,
or network timeout.

RETURNS: {"session_id": str, "banner": str}

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
hostYesHostname or IP of the SSH server (e.g. '192.168.1.10', 'example.com')
portNoSSH port number, 1–65535
passwordNoPassword for password-based auth; omit for key-based auth
usernameNoLogin user for authentication; omit to use SSH agent or OS default
key_filepathNoAbsolute path to a private key file (e.g. '/home/user/.ssh/id_rsa')
banner_timeoutNoMax seconds to capture the MOTD/welcome banner after login

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. Changed6 schema fields changedv1.0.11
    • changedInput schema / properties / banner_timeout / description
      Previous value: -"Max seconds to capture the MOTD/welcome banner after login. If exceeded, banner returns '' (not an error). Increase for slow hosts; set to 0 to skip banner capture entirely"New value: +"Max seconds to capture the MOTD/welcome banner after login"
    • changedInput schema / properties / host / description
      Previous value: -"Hostname or IP of the SSH server (e.g. '192.168.1.10', 'example.com'). DNS resolution happens at connect time; unresolvable hosts raise an error"New value: +"Hostname or IP of the SSH server (e.g. '192.168.1.10', 'example.com')"
    • changedInput schema / properties / key_filepath / description
      Previous value: -"Absolute path to a private key file (e.g. '/home/user/.ssh/id_rsa'). Must be readable by the server process. Preferred over password for non-interactive use"New value: +"Absolute path to a private key file (e.g. '/home/user/.ssh/id_rsa')"
    • changedInput schema / properties / password / description
      Previous value: -"Password for password-based auth. If both password and key_filepath are provided, key is tried first, password is the fallback"New value: +"Password for password-based auth; omit for key-based auth"
    • changedInput schema / properties / port / description
      Previous value: -"SSH port, 1–65535. Most servers listen on 22; non-standard ports are common for hardened hosts"New value: +"SSH port number, 1–65535"
    • changedInput schema / properties / username / description
      Previous value: -"Login user for authentication. If omitted, falls back to SSH agent or OS default user. Required when the remote user differs from the local one"New value: +"Login user for authentication; omit to use SSH agent or OS default"
  2. Changed6 schema fields changedv1.0.9
    • changedInput schema / properties / banner_timeout / description
      Previous value: -"The timeout in seconds to wait for the MOTD/welcome banner after the connection opens"New value: +"Max seconds to capture the MOTD/welcome banner after login. If exceeded, banner returns '' (not an error). Increase for slow hosts; set to 0 to skip banner capture entirely"
    • changedInput schema / properties / host / description
      Previous value: -"The hostname or IP address of the SSH server to connect to (e.g., '192.168.1.10' or 'example.com')"New value: +"Hostname or IP of the SSH server (e.g. '192.168.1.10', 'example.com'). DNS resolution happens at connect time; unresolvable hosts raise an error"
    • changedInput schema / properties / key_filepath / description
      Previous value: -"Optional absolute path to a private key file for key-based auth; must be readable by the server process. If both this and password are supplied, the key is attempted first"New value: +"Absolute path to a private key file (e.g. '/home/user/.ssh/id_rsa'). Must be readable by the server process. Preferred over password for non-interactive use"
    • changedInput schema / properties / password / description
      Previous value: -"Optional password for password-based authentication. Omit if using key-based authentication"New value: +"Password for password-based auth. If both password and key_filepath are provided, key is tried first, password is the fallback"
    • changedInput schema / properties / port / description
      Previous value: -"The port number of the SSH server (default is 22)"New value: +"SSH port, 1–65535. Most servers listen on 22; non-standard ports are common for hardened hosts"
    • changedInput schema / properties / username / description
      Previous value: -"Optional username for authentication. If omitted, the connection will use SSH agent or system defaults"New value: +"Login user for authentication. If omitted, falls back to SSH agent or OS default user. Required when the remote user differs from the local one"
  3. Changed2 schema fields changedv1.0.7
    • changedInput schema / properties / key_filepath / description
      Previous value: -"Optional absolute path to a private key file (SSH key) for key-based authentication"New value: +"Optional absolute path to a private key file for key-based auth; must be readable by the server process. If both this and password are supplied, the key is attempted first"
    • changedInput schema / properties / password / description
      Previous value: -"Optional password for password-based authentication. If using key-based authentication, this can be omitted"New value: +"Optional password for password-based authentication. Omit if using key-based authentication"
  4. Changed6 schema fields changedv1.0.3
    • addedInput schema / properties / banner_timeout / description
      Added value: +"The timeout in seconds to wait for the MOTD/welcome banner after the connection opens"
    • addedInput schema / properties / host / description
      Added value: +"The hostname or IP address of the SSH server to connect to (e.g., '192.168.1.10' or 'example.com')"
    • addedInput schema / properties / key_filepath / description
      Added value: +"Optional absolute path to a private key file (SSH key) for key-based authentication"
    • addedInput schema / properties / password / description
      Added value: +"Optional password for password-based authentication. If using key-based authentication, this can be omitted"
    • addedInput schema / properties / port / description
      Added value: +"The port number of the SSH server (default is 22)"
    • addedInput schema / properties / username / description
      Added value: +"Optional username for authentication. If omitted, the connection will use SSH agent or system defaults"
  5. First observedv0.1.0

TDQS

A5/5.0
Behavior5/5

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

Discloses side effects (TCP socket with keepalive, leak if disconnect not called), errors (auth, unresolvable host, etc.), and behaviors like host resolution and banner capture. Adds context beyond annotations.

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?

Well-structured with sections: overview, parameter guidance, side effects, errors, returns. Front-loaded purpose. No wasted words; each sentence adds value.

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

Completeness5/5

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

Complete for a complex tool: covers all 6 parameters, side effects, error conditions, and return format. No gaps in information needed for correct invocation.

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 coverage is 100%, but the description adds valuable guidance: key_filepath tried first, password fallback, username defaults, banner_timeout behavior (0 skips). Adds meaning beyond schema.

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 clearly states it opens a persistent SSH connection and returns a session_id for use with 'execute'. It distinguishes from sibling tools like 'execute' (for local commands) and 'disconnect'.

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

Usage Guidelines5/5

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

Explicit guidance: 'For local commands, call execute directly — no session needed.' Details parameter precedence, default behavior, banner timeout, and the lifecycle (connect, execute, disconnect).

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

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/QiuwenZheng/interminal'

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