ptyctl
Verified Safeby nfshanq
Overview
Provides a Rust-based MCP server for remote interactive control over SSH and Telnet sessions, enabling agents to manage remote systems.
Installation
ptyctl serve --transport stdioEnvironment Variables
- PTYCTL_TRANSPORT
- PTYCTL_HTTP_LISTEN
- PTYCTL_LOG_LEVEL
- PTYCTL_CONTROL_SOCKET
- PTYCTL_CONTROL_MODE
- PTYCTL_AUTH_TOKEN
- XDG_RUNTIME_DIR
- PTYCTL_REPO
Security Notes
The server uses `portable-pty` to wrap the system's OpenSSH client. The `ssh_options.extra_args` parameter in `ptyctl_session` allows passing arbitrary arguments to the underlying `ssh` command, which could be a vector for exploitation if an untrusted client or an exploited LLM provides malicious arguments (e.g., `LocalCommand` directives in `ssh_config`). However, arguments are passed as a `Vec<String>`, mitigating simple shell injection within individual arguments. Temporary files for private keys are handled with correct permissions (0o600). HTTP transport includes bearer token authentication. The control socket is local and read-only by default. Overall, it's robust, but usage with untrusted inputs for `extra_args` requires caution.
Similar Servers
linux-mcp-server
This server provides read-only Linux system administration, diagnostics, and troubleshooting capabilities for AI agents using the Model Context Protocol (MCP).
ssh-mcp-server
Provides secure SSH capabilities (command execution, SFTP, port forwarding, templates) for AI assistants to manage remote servers.
mcp-ssh-manager
Manages remote SSH servers via the Model Context Protocol (MCP), enabling AI assistants like Claude Code and OpenAI Codex to execute commands, transfer files, monitor health, and automate DevOps tasks.
ssh-mcp-server
Provides secure remote server management capabilities, including SSH connection, command execution, and SFTP file transfers, via the MCP protocol for integration with AI agents.