Agentic SSH logo

Agentic SSH

Secure, pooled SSH access for AI agents with host allowlists, structured diagnostics, and asynchronous remote commands.

Install Agentic SSH

Run the project’s own setup commands, in order.

Setup steps from the project

Agentic SSH installs with its own steps rather than a config we can generate, so these are copied as-is. Follow them in order and run the commands in a terminal. Source: github.com

  1. 1. Install
    brew install sandbanks/tap/agentic_ssh
    
  2. 2. Install
    cargo binstall agentic_ssh
    
  3. 3. Install
    agentic_ssh install
    

Overview

Agentic SSH provides AI coding assistants with pooled, asynchronous SSH access to homelabs, development servers, and clusters. It restricts connections through an explicit host allowlist, summarizes verbose command output, and supports detached background jobs for long-running work. Reach for it when an agent needs repeatable multi-host diagnostics without unrestricted access to every SSH alias or large terminal dumps in its context.

Use cases

  • Audit CPU, memory, and disk usage across several servers
  • Inspect listening ports and their owning processes
  • Check Docker containers and tail service logs
  • Run deployments or builds as detached background jobs
  • Watch the same command execute concurrently across a host group

Key features

  • Explicit SSH host allowlist with deny-by-default behavior
  • Pooled SSH connections with automatic keepalives
  • Concurrent multi-host command execution
  • Structured and summarized command output
  • Detached background jobs with local session logs
  • CLI watch, JSON, and connection-pool TUI commands

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked

Recent health check succeeded.

12/12 checks healthy over the last 71d

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars6Stargazers on the source repository.
Last commit3d agoMost recent push to the default branch.

How Agentic SSH works

What Agentic SSH does

Agentic SSH exposes selected SSH operations through the Model Context Protocol for AI coding assistants. It is designed for environments where an agent needs to inspect or operate several remote machines, including homelabs, development servers, and clusters.

Access is restricted by an explicit host policy. The allow_hosts setting determines which hosts an agent may contact; when it is not configured, hosts are blocked by default. This prevents the MCP connection from automatically granting access to every alias in the local SSH configuration.

The project also includes a command-line interface for human operators. Its commands can watch concurrent activity across hosts, return diagnostic results as JSON, or display the state of the SSH connection pool in a terminal interface.

How it works

The server uses Rust-native SSH connections with pooling and 30-second keepalives. Reusing connections avoids establishing a new SSH handshake for each command. Commands can run across multiple hosts concurrently, which suits fleet checks and comparative health investigations.

Long-running operations can be detached with background: true. The agent can continue working while the remote task runs, with output tracked in a local session log under ~/.agentic_ssh/sessions/. Verbose output is summarized instead of being returned as an unfiltered terminal stream, reducing the amount of command output placed in the model context.

Arguments are passed in structured form and escaped by the server, rather than requiring the model to construct nested shell- and JSON-quoting manually.

Setup and configuration

Install on macOS or Linux with Homebrew:

bash
brew install sandbanks/tap/agentic_ssh

Precompiled binaries can also be installed with cargo binstall agentic_ssh, or the program can be run through Nix:

bash
nix run github:sandbanks/agentic_ssh -- doctor

Run agentic_ssh install to detect supported AI tools and register the MCP server. Use agentic_ssh doctor to check its health. Configure allow_hosts before granting an agent access to remote machines.

Tools and capabilities

The MCP tool catalog includes:

  • list_hosts to return authorized SSH host aliases from ~/.ssh/config.
  • list_groups to return configured multi-host groups.
  • run_command to execute commands concurrently, either synchronously or in detached background mode.
  • get_system_stats to retrieve CPU load, memory usage, and disk partition statistics.
  • list_ports to inspect listening TCP and UDP ports with process details.
  • Docker status checks and container-log tailing for container diagnostics.

The CLI adds watch for live multi-host command output, json for parseable diagnostic results, and tui for connection-pool and running-command monitoring.

Limitations and notes

The allowlist is central to the security model: without allow_hosts, hosts are blocked. The server operates against SSH hosts and groups defined in the local SSH configuration, so those aliases and group definitions need to exist for discovery and multi-host operations. The local session directory stores output from detached work.

Written by AllMCPs with AI assistance from the project’s README and listing data. How we build listings

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Agentic SSH

Agentic SSH is an MCP server that connects AI coding assistants to authorized SSH hosts in homelabs, development servers, and clusters. Its main tools include host and group discovery, concurrent command execution, system-stat collection, port inspection, Docker checks, and container-log tailing, with host allowlists controlling access.

Install it with Homebrew, cargo-binstall, or Nix. Use `brew install sandbanks/tap/agentic_ssh`, `cargo binstall agentic_ssh`, or `nix run github:sandbanks/agentic_ssh -- doctor`. Then run `agentic_ssh install` to register it with detected AI tools.

Set the `allow_hosts` configuration to explicitly approve the SSH hosts the agent may use. Hosts are blocked by default when `allow_hosts` is not configured, preventing unrestricted access to aliases in the local SSH configuration.

Yes. Pass `background: true` to `run_command` to detach a long-running command while the agent continues working. Output is tracked in a local session log under `~/.agentic_ssh/sessions/`.

Yes. Cursor is among the AI tools that `agentic_ssh install` can detect and register for MCP use.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewAgentic SSH AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/agentic-ssh?style=directory)](https://allmcps.com/mcp/agentic-ssh)
HTML Embed
<a href="https://allmcps.com/mcp/agentic-ssh"><img src="https://allmcps.com/api/badge/agentic-ssh?style=directory" alt="Agentic SSH on AllMCPs" /></a>