
Research
/Security News
PolinRider Spreads Through Compromised GitHub Accounts and Packagist
Operators behind PolinRider used a compromised GitHub account to plant malware in four development versions of a Packagist package with 700,000+ downloads.
ssh-agent-mcp-server
Advanced tools
MCP server for SSH remote server management with SSH agent authentication support
An MCP (Model Context Protocol) server for SSH remote server management with SSH agent authentication support.
This server solves a common problem with SSH MCP servers: support for passphrase-protected SSH keys. By using SSH agent authentication, you can securely connect to remote servers without exposing your key passphrase.
The server supports multiple authentication methods and will use them in this order:
SSH_AUTH_SOCK is set or auto-detectedSSH_PRIVATE_KEY_PATH is setBoth methods can be configured simultaneously. If SSH agent authentication is available, it takes priority. The private key file method is used as a fallback or when the agent is not available.
| Tool | Group | Description |
|---|---|---|
ssh_connection_info | readonly, write, admin | Get configured SSH connection information |
ssh_list_directory | readonly, write, admin | List directory contents on remote server |
ssh_download | readonly, write, admin | Download file from remote server via SFTP |
ssh_upload | write, admin | Upload file to remote server via SFTP |
ssh_execute | admin | Execute shell command on remote server |
| Resource | Description |
|---|---|
ssh://config | SSH connection configuration and status (for debugging) |
Control which tools are available via the ENABLED_TOOLGROUPS environment variable:
| Group | Description |
|---|---|
readonly | Safe operations (connection info, list, download) |
write | File modifications (upload) |
admin | Full access including command execution |
Examples:
ENABLED_TOOLGROUPS="readonly" - Only allow browsing and downloadsENABLED_TOOLGROUPS="readonly,write" - Allow file transfers but no command executionnpx ssh-agent-mcp-server
Or install globally:
npm install -g ssh-agent-mcp-server
| Variable | Required | Description | Default |
|---|---|---|---|
SSH_HOST | Yes | Hostname or IP address of the SSH server | - |
SSH_USERNAME | Yes | Username for SSH authentication | - |
SSH_PORT | No | SSH port number | 22 |
SSH_AUTH_SOCK | No | Path to SSH agent socket | Auto-detected |
SSH_PRIVATE_KEY_PATH | No | Path to private key file | - |
SSH_PASSPHRASE | No | Passphrase for encrypted private key | - |
SSH_TIMEOUT | No | Connection timeout in milliseconds | 30000 |
ENABLED_TOOLGROUPS | No | Comma-separated tool groups | All enabled |
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"ssh": {
"command": "npx",
"args": ["-y", "ssh-agent-mcp-server"],
"env": {
"SSH_HOST": "192.168.1.100",
"SSH_USERNAME": "deploy",
"SSH_AUTH_SOCK": "${SSH_AUTH_SOCK}"
}
}
}
}
Restart Claude Desktop and you should be ready to go!
SSH agent authentication is the recommended method for passphrase-protected keys:
Ensure your SSH agent is running with your key loaded:
# Check if agent is running
ssh-add -l
# If not, add your key
ssh-add ~/.ssh/id_ed25519
Pass the SSH_AUTH_SOCK environment variable to the MCP server
The server will automatically use the agent for authentication, and your passphrase-protected key stays secure in the agent.
ssh-add$SSH_AUTH_SOCKssh2 libraryThis is more secure than:
Execute a command on the remote server.
Parameters:
command (required): Shell command to executecwd (optional): Working directorytimeout (optional): Command timeout in msExample:
{
"command": "ls -la /var/log",
"cwd": "/home/user"
}
Returns: JSON with stdout, stderr, and exit code
Upload a file to the remote server via SFTP.
Parameters:
localPath (required): Absolute path to local fileremotePath (required): Destination path on serverDownload a file from the remote server via SFTP.
Parameters:
remotePath (required): Path on remote serverlocalPath (required): Local destination pathList directory contents on the remote server.
Parameters:
path (required): Directory path to listReturns: JSON array with filename, type, size, permissions, modified time
Get information about the configured SSH connection.
Returns: JSON with host, port, username, and authentication details
# Install dependencies
npm run install-all
# Build
npm run build
# Run in development mode
npm run dev
# Run tests
npm test
npm run test:integration
MIT
FAQs
MCP server for SSH remote server management with SSH agent authentication support
The npm package ssh-agent-mcp-server receives a total of 84 weekly downloads. As such, ssh-agent-mcp-server popularity was classified as not popular.
We found that ssh-agent-mcp-server demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.

Research
/Security News
Operators behind PolinRider used a compromised GitHub account to plant malware in four development versions of a Packagist package with 700,000+ downloads.

Security News
GitHub Actions now supports cache-mode, a least-privilege control on the Actions cache aimed at the cache poisoning technique behind recent compromises.

Company News
Allow myself to introduce... myself.