# ssh-licco [Health: Active]

**Category:** 🖥️ Command Line  
**Repository:** https://github.com/Echoqili/ssh-licco.git  
**GitHub Stars:** 4  
**Views:** 13  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/ssh-licco

## Description
SSH Model Context Protocol Server - Connect to SSH servers and execute commands via AI assistants.

## Tools
Capabilities this server exposes over MCP:

- **ssh_connect** — Establish an SSH connection to a remote server. If no parameters are provided, auto-connects using environment variables or saved config. Supports password, private key, and agent authentication. Optionally save the config and/or execute a command after connecting.
- **ssh_execute** — Execute a command on a remote server. If session_id is omitted, auto-connects using environment variables. Supports background execution for long-running tasks (auto-detected or manual). Use session_type='screen' or 'tmux' for persistent sessions that survive SSH disconnect.
- **ssh_disconnect** — Close an active SSH session. If no session_id is provided, lists all currently active sessions with connection details.
- **ssh_file_transfer** — Transfer and manage files between local and remote server via SFTP. Supports upload, download, list, write (write content directly to remote file), append, delete, mkdir, stat, and remote_copy (server-to-server direct transfer via scp/rsync, avoiding local relay).
- **ssh_host** — Manage SSH server configurations in hosts.json. Use action=list to view all hosts, action=add to register a new server, action=remove to delete a server.
- **ssh_docker** — Manage Docker on the remote server. Supports ps (list containers), images (list images), build (build an image in background), and logs (view container logs).
- **ssh_generate_key** — Generate a new SSH key pair (RSA or Ed25519) for secure key-based authentication. Optionally save to a file path.
- **ssh_session** — Manage persistent screen/tmux sessions on the remote server for long-running interactive tasks (deploy, build, test, REPL). Sessions survive SSH disconnect. Actions: create (new detached session running a command), send (send keys/command to a session), capture (read current screen), list (list sessions), kill (kill a session).
- **ssh_process** — Manage background processes and SSH tunnels on the remote server. Actions: start (launch a detached background process, returns PID), stop (stop a process by PID), status (check if a PID is running), list (list tracked background tasks), tunnel_open (local port forward to remote host:port), tunnel_close (close a tunnel), tunnel_list (list active tunnels).

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `uvx` (confidence: high):

```json
"mcpServers": {
  "ssh-licco": {
    "command": "uvx",
    "args": ["ssh-licco"]
  }
}
```

## Documentation

## What ssh-licco MCP server does

ssh-licco gives an MCP client a structured interface for operating remote machines over SSH. It can establish and close connections, run remote commands, transfer and edit files through SFTP, inspect or manage Docker resources, and maintain persistent terminal sessions. The supported target environments are Linux with OpenSSH, Windows Server with OpenSSH for Windows or PowerShell Remoting over SSH, and macOS with its system OpenSSH implementation.

Authentication can use a password, a private key, or an SSH agent. The server can also generate RSA or Ed25519 key pairs and maintain named host entries in a hosts.json configuration.

## How it works

Install the Python package and register the server as an MCP process using `python -m ssh_mcp.server`. A client can pass SSH connection settings through its MCP environment configuration, or connection tools can use saved host settings. When connection parameters are omitted, `ssh_connect` and other applicable tools can use environment variables or stored configuration to connect automatically.

Command execution supports regular and background work. Long-running tasks can use detached processes or persistent `screen` and `tmux` sessions. These sessions can be created, sent input, inspected, listed, and terminated, allowing a build, deployment, test run, or interactive REPL to continue after the SSH connection closes.

The server supports multiple concurrent SSH sessions, connection reuse, keepalive intervals, connection and session timeouts, automatic reconnection, and structured JSON audit logging. Its security configuration includes strict, balanced, and relaxed modes. Destructive command patterns such as absolute-path recursive removal, filesystem formatting, raw-disk overwrites, fork bombs, and recursive root permission changes are blocked regardless of security mode.

## Setup and configuration

Python 3.10 or newer is required. Install from PyPI with:

```bash
pip install ssh-licco
```

For a source installation, clone the repository and run `pip install -e .` from its directory.

Register the process in an MCP client with a configuration similar to:

```json
{
  "mcpServers": {
    "ssh": {
      "command": "python -m ssh_mcp.server"
    }
  }
}
```

The README specifically gives setup instructions for Cursor and Claude Desktop. Optional environment settings include `SSH_HOST`, `SSH_USER`, `SSH_PASSWORD`, `SSH_PORT`, `SSH_TIMEOUT`, `SSH_KEEPALIVE_INTERVAL`, `SSH_SESSION_TIMEOUT`, and `SSH_CLIENT_TYPE`. Security-related settings include `SSH_SECURITY_LEVEL`, `SSH_EXTRA_ALLOWED_COMMANDS`, and `SSH_BASE_DIR`.

## Tools and capabilities

- `ssh_connect`: Open an SSH connection, optionally save its configuration, and run an initial command.
- `ssh_execute`: Run remote commands, wait for long tasks, or start background work with nohup, screen, or tmux.
- `ssh_disconnect`: Close a selected session or list active sessions when no session ID is supplied.
- `ssh_file_transfer`: Upload, download, list, write, append, delete, create directories, inspect metadata, and copy between remote servers with scp or rsync.
- `ssh_host`: List, add, and remove saved host configurations.
- `ssh_docker`: List containers or images, build images in the background, and view container logs.
- `ssh_generate_key`: Create RSA or Ed25519 SSH key pairs.
- `ssh_session`: Create, control, capture, list, and kill persistent screen or tmux sessions.
- `ssh_process`: Start, stop, inspect, and list background processes, and open, close, or list SSH tunnels.

## Limitations and notes

Remote access still depends on a reachable SSH service and credentials accepted by the target host. Windows operations should use Windows-style paths when appropriate. The MCP gateway intentionally rejects the documented catastrophic command patterns; those operations require direct SSH access outside the gateway. File deletion also applies path-traversal and sensitive-path checks for Unix and Windows path formats.

_Full upstream README: https://allmcps.com/mcp/ssh-licco/readme_

