Mcp Ssh Server — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited Mcp Ssh Server (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
A Model Context Protocol (MCP) server that bridges VS Code on Windows with remote Linux servers via SSH. This enables AI assistants like GitHub Copilot to seamlessly interact with remote development environments.
~/.mcp-ssh/┌─────────────────────┐
│ VS Code + Copilot │
└──────────┬──────────┘
│ stdio (MCP Protocol)
▼
┌─────────────────────┐
│ MCP SSH Server │
│ ┌───────────────┐ │
│ │ Resource │ │ Exposes remote file system
│ │ Handler │ │
│ └───────────────┘ │
│ ┌───────────────┐ │
│ │ Tool Handler │ │ Provides remote operations
│ └───────────────┘ │
│ ┌───────────────┐ │
│ │ SSH Manager │ │ Password-to-key bootstrap
│ └───────────────┘ │
│ ┌───────────────┐ │
│ │ SFTP Client │ │ File operations
│ └───────────────┘ │
└──────────┬──────────┘
│ SSH/SFTP
▼
┌─────────────────────┐
│ Remote Linux │
│ Server │
└─────────────────────┘ git clone <repository-url> mcp-ssh-server
cd mcp-ssh-server npm installAdd this configurationto to your MCP settings file. The location depends on your VS Code configuration:
{
"mcpServers": {
"ssh-server": {
"command": "node",
"args": ["path\\mcp-ssh-server\\src\\index.js"],
"env": {
"LOG_LEVEL": "info"
}
}
}
}The MCP SSH Server implements an intelligent authentication flow:
~/.ssh/authorized_keys on the remote server~/.mcp-ssh/keys/id_ed25519_<host>0600 permissions (owner read/write only)The MCP server provides the following tools that can be invoked by AI assistants:
connect_sshConnect to a remote SSH server.
Parameters:
host (required): Remote host address or IPusername (required): SSH usernamepassword (optional): SSH password (only needed for first connection)port (optional): SSH port (default: 22)Example:
{
"host": "example.com",
"username": "developer",
"password": "initial-password",
"port": 22
}execute_commandExecute a shell command on the remote server.
Parameters:
command (required): Shell command to executeworkingDirectory (optional): Working directory for the commandExample:
{
"command": "gcc main.c -o main && ./main",
"workingDirectory": "/home/developer/project"
}read_fileRead contents of a file from the remote server.
Parameters:
path (required): Absolute or relative path to the fileExample:
{
"path": "/home/developer/config.json"
}write_fileWrite content to a file on the remote server.
Parameters:
path (required): Absolute or relative path to the filecontent (required): Content to writeExample:
{
"path": "/home/developer/script.sh",
"content": "#!/bin/bash\necho 'Hello World'"
}list_directoryList contents of a directory on the remote server.
Parameters:
path (optional): Directory path (defaults to home directory)Example:
{
"path": "/home/developer/projects"
}Once configured, you can interact with your remote server through Copilot:
Example prompts:
To create a custom chat variable like @ssh-server, you would need to:
/connect, /exec, /read, /writeExample extension.js (conceptual):
vscode.chat.createChatParticipant(
"ssh-server",
async (request, context, stream, token) => {
// Connect to MCP server via stdio
// Forward user's request to appropriate tool
// Stream response back to chat
}
);LOG_LEVEL: Set logging level (debug, info, warn, error) - default: infoLOG_TO_FILE: Enable file logging - default: false~/.mcp-ssh/
├── keys/ # SSH private keys
│ ├── id_ed25519_user@host_22
│ └── id_ed25519_user@other_22
├── config/ # Configuration files (future)
└── logs/ # Log files (if enabled)User: "Connect to dev.example.com as developer with password 'mypass'"
AI: Uses connect_ssh tool
Server: Connects, generates keys, deploys public key
AI: "Connected! Future connections will use keys."
User: "Compile the C program in ~/project"
AI: Uses execute_command tool
Server: Executes "cd ~/project && gcc main.c -o main"
AI: Returns stdout/stderr and exit codeUser: "Read the nginx config"
AI: Uses read_file tool with path "/etc/nginx/nginx.conf"
Server: Returns file contents
AI: Displays configuration
User: "Add this server block to the config..."
AI: Uses write_file tool
Server: Writes updated configuration
AI: "Configuration updated successfully"Problem: "Connection timeout"
systemctl status sshdssh user@hostProblem: "Key authentication failed"
~/.ssh/authorized_keys permissions on remote server (should be 600)~/.ssh directory permissions (should be 700)sudo tail -f /var/log/auth.logProblem: "Failed to deploy public key"
~/.ssh/authorized_keys~/.ssh directory exists on remote server/etc/ssh/sshd_configProblem: "Failed to write file"
mcp-ssh-server/
├── src/
│ ├── index.js # Entry point
│ ├── config.js # Configuration
│ ├── mcp/
│ │ ├── MCPServer.js # Main MCP server
│ │ ├── ResourceHandler.js # MCP Resources implementation
│ │ └── ToolHandler.js # MCP Tools implementation
│ ├── ssh/
│ │ ├── SSHConnectionManager.js # SSH connection management
│ │ └── KeyManager.js # Key generation and deployment
│ ├── sftp/
│ │ └── SFTPClient.js # SFTP operations wrapper
│ └── utils/
│ └── logger.js # Logging utility
├── package.json
└── README.mdnpm run devThis starts the server with Node.js inspector enabled for debugging.
~/.mcp-ssh/keys/ with restrictive permissionsMIT
Contributions are welcome! Please feel free to submit issues and pull requests.
~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.