home / mcp / mcp ssh server

MCP SSH Server

Provides a secure MCP SSH server for remote command execution and file transfers over SSH.

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "shaike1-mcp-server-ssh": {
      "command": "node",
      "args": [
        "%APPDATA%/npm/node_modules/mcp-ssh/dist/server.js"
      ],
      "env": {
        "SSH_PORT": "8889",
        "SSH_LOG_LEVEL": "info"
      }
    }
  }
}

You can run a secure MCP SSH server to perform remote commands and manage files over SSH. This server enables authenticated access, command execution, and file operations with clear controls and logging, making it suitable for remote administration and automation within your MCP setup.

How to use

Set up the MCP SSH server and connect with an MCP client to perform remote actions. You can establish a connection, run shell commands on the remote host, upload and download files, and manage directories. The server supports both password-based and key-based authentication for flexible security. Use a client to issue commands like execute, upload, download, and list directory contents, and monitor progress and logs for auditing.

How to install

npm install mcp-ssh
```

```json
{
  "mcpServers": {
    "ssh": {
      "command": "node",
      "args": ["%APPDATA%/npm/node_modules/mcp-ssh/dist/server.js"],
      "env": {
        "SSH_PORT": "8889",
        "SSH_LOG_LEVEL": "info"
      }
    }
  }
}
```

Place the configuration block where your MCP desktop or orchestration environment expects MCP server configurations. Start the server using the runtime command shown above when you are ready to connect a client.

Additional notes

This MCP SSH server provides secure connection management, supports both password and key-based authentication, and allows remote command execution and file operations such as upload/download. You can monitor progress for transfers, enforce permissions, perform directory operations, and review detailed logs for troubleshooting and auditing.

Configuration and security

Configure your client to connect via the SSH endpoint you start on port 8889 by default. You can adjust the port and log level through the environment variables SSH_PORT and SSH_LOG_LEVEL. Ensure you use strong authentication (prefer key-based access) and limit access to trusted hosts to enhance security.

Examples of common tasks

- Connect to the MCP SSH server and authenticate with a password or a private key.

- Execute a remote command like listing files in a directory.

- Upload a local file to a remote path or download a file from the remote system to your local machine.

Troubleshooting tips

If you cannot connect, verify that the server process is running and listening on the configured port. Check the SSH_LOG_LEVEL for detailed logs and review permissions on the remote paths you are accessing.

Available tools

remote_command

Execute commands on the remote MCP SSH server from your client, enabling remote administration and automation.

file_upload

Upload local files to the remote server, enabling data transfer and deployment workflows.

file_download

Download files from the remote server to your local machine for backup or analysis.

dir_list

List contents of a remote directory to inspect files and structure.

status_logging

Provide detailed logs of SSH sessions, including authentication, commands, and file transfers for auditing and debugging.