mcp-ssh-session@0.2.2
CAUTION· not startedPublisher claims: "MCP server for managing persistent SSH sessions" Observed in sandbox: no network, touches nothing outside the project, writes no memory.
Coverage
Not started: dependency install failed; the server itself was not observed.- Tested
- the dependency install step · every file read, file written and host contacted by what ran
- Not tested
- server startup · the tool list · tool behavior
What this means for the label: Caution here covers what ran. The server's tools were not exercised with a real credential, so nothing about their behavior is asserted; the credential summary below says what to do with that.
Before you give it your token
- It will ask for
- no credential variables read in the code
- Where it talks to
- no vendor host named in the code
- What the honeypot saw
- no credential files read · no network
- What we could not test
- server startup · the tool list · tool behavior
Connect it under the guard. Not started: dependency install failed; the server itself was not observed. The code names no credential variable; the guard pins the network to what the honeypot saw and logs every call.
Never paste a credential into a chat, a ticket or a report, including ours. How the guard holds it.
Is [email protected] safe to install?
KillerSkills ran it in the KillerSkills honeypot sandbox (2 scenarios; not started: dependency install failed; the server itself was not observed) on 2026-11-09 and scored it 68/100 (Caution). It is not known to be malicious, but it has behaviour or code a security policy should decide on before install. Notable findings: References a credential file in the home directory; Privileged sudo command; Privileged sudo command. Summary: no network, touches nothing outside the project, writes no memory.
Behavior trace
Honeypot run · 0 s · 2 scenarios · 0 deviationsStatic findings
key_filename="~/.ssh/id_rsa"Fix: Stop enumerating or reading credential locations; take secrets from a declared environment variable the user sets on purpose.- Handles interactive prompts for enable mode and sudo authenticationFix: Build commands from fixed arguments; do not interpolate untrusted strings into a shell.sudo_password: Password for sudo commands on Unix/Linux hosts (optional)Fix: Build commands from fixed arguments; do not interpolate untrusted strings into a shell.- **SSH Config Support**: Automatically reads and uses settings from `~/.ssh/config`, including aliases, hosts, ports, users, and identity filesFix: Stop enumerating or reading credential locations; take secrets from a declared environment variable the user sets on purpose.- `sudo_password` (str, optional): Password for sudo commands on Unix/Linux hostsFix: Build commands from fixed arguments; do not interpolate untrusted strings into a shell.If an SSH config alias is provided, configuration will be read from ~/.ssh/config.Fix: Stop enumerating or reading credential locations; take secrets from a declared environment variable the user sets on purpose.- **SSH Config Support**: Automatically reads and uses settings from `~/.ssh/config`, including aliases, hosts, ports, users, and identity filesFix: Stop enumerating or reading credential locations; take secrets from a declared environment variable the user sets on purpose.- **Sudo Support**: Automatic password handling for sudo commands on Unix/Linux hostsFix: Build commands from fixed arguments; do not interpolate untrusted strings into a shell.The `host` parameter can be either a hostname/IP or an SSH config alias. If an SSH config alias is provided, configuration will be read from `~/.ssh/config`.Fix: Stop enumerating or reading credential locations; take secrets from a declared environment variable the user sets on purpose.- Loads and parses `~/.ssh/config` on initializationFix: Stop enumerating or reading credential locations; take secrets from a declared environment variable the user sets on purpose.The `host` parameter can be either a hostname/IP or an SSH config alias. If an SSH config alias is provided, configuration will be read from `~/.ssh/config`.Fix: Stop enumerating or reading credential locations; take secrets from a declared environment variable the user sets on purpose.logger.debug(f"Executing as sudo for {command_id}")Fix: Build commands from fixed arguments; do not interpolate untrusted strings into a shell.# If ~/.ssh/config has an entry for "myserver"Fix: Stop enumerating or reading credential locations; take secrets from a declared environment variable the user sets on purpose.f"For example, if it's a password, provide the password followed by \\n."Fix: Stop enumerating or reading credential locations; take secrets from a declared environment variable the user sets on purpose.key_filename="~/.ssh/id_rsa"Fix: Stop enumerating or reading credential locations; take secrets from a declared environment variable the user sets on purpose."""Execute a sudo command using the persistent shell, handling password prompts.Fix: Build commands from fixed arguments; do not interpolate untrusted strings into a shell.logger.info(f"SFTP permission denied, falling back to sudo cat for {remote_path}")Fix: Build commands from fixed arguments; do not interpolate untrusted strings into a shell.-v ~/.ssh/id_rsa:/mounts/ssh-keys/id_rsa:ro \Fix: Stop enumerating or reading credential locations; take secrets from a declared environment variable the user sets on purpose.&& rm -rf /var/lib/apt/lists/*Fix: Build commands from fixed arguments; do not interpolate untrusted strings into a shell.RUN apt-get update && apt-get install -y gosu && rm -rf /var/lib/apt/lists/*Fix: Build commands from fixed arguments; do not interpolate untrusted strings into a shell.-v ~/.ssh/id_rsa.pub:/mounts/ssh-keys/id_rsa.pub:ro \Fix: Stop enumerating or reading credential locations; take secrets from a declared environment variable the user sets on purpose.-v ~/.ssh/config:/mounts/ssh-config/config:ro \Fix: Stop enumerating or reading credential locations; take secrets from a declared environment variable the user sets on purpose.chmod_cmd = f"sudo chmod {oct(permissions)[2:]} {shlex.quote(remote_path)}"Fix: Request the narrowest permission that works; replace wildcards with the exact paths or hosts.cmd = f"sudo cat {shlex.quote(remote_path)} | head -c {byte_limit}"Fix: Build commands from fixed arguments; do not interpolate untrusted strings into a shell.session_manager, ssh_config, command="rm -rf /tmp/mcp_test_dir", timeout=5Fix: Build commands from fixed arguments; do not interpolate untrusted strings into a shell.the sudo password prompt. The command will be automatically prefixed with 'sudo'Fix: Build commands from fixed arguments; do not interpolate untrusted strings into a shell.print("Attempting to write file with sudo immediately (should fail)...")Fix: Build commands from fixed arguments; do not interpolate untrusted strings into a shell.# Fallback to sudo if permission denied and use_sudo or sudo_password providedFix: Build commands from fixed arguments; do not interpolate untrusted strings into a shell.-v ~/.ssh/id_rsa:/mounts/ssh-keys/id_rsa:ro \Fix: Stop enumerating or reading credential locations; take secrets from a declared environment variable the user sets on purpose.-v ~/.ssh/id_rsa.pub:/mounts/ssh-keys/id_rsa.pub:ro \Fix: Stop enumerating or reading credential locations; take secrets from a declared environment variable the user sets on purpose.chmod 700 /home/mcpuser/.sshFix: Request the narrowest permission that works; replace wildcards with the exact paths or hosts.- ~/.ssh:/mounts/ssh-keys:roFix: Stop enumerating or reading credential locations; take secrets from a declared environment variable the user sets on purpose.- ~/.ssh/config:/mounts/ssh-config/config:roFix: Stop enumerating or reading credential locations; take secrets from a declared environment variable the user sets on purpose."1. Use sudo or run as appropriate user\n"Fix: Build commands from fixed arguments; do not interpolate untrusted strings into a shell.sudo_password: Password for sudo (optional, not needed if NOPASSWD configured)Fix: Build commands from fixed arguments; do not interpolate untrusted strings into a shell.If an SSH config alias is provided, configuration will be read from ~/.ssh/config.Fix: Stop enumerating or reading credential locations; take secrets from a declared environment variable the user sets on purpose.# Ensure command starts with sudoFix: Build commands from fixed arguments; do not interpolate untrusted strings into a shell.command = f"sudo {command}"Fix: Build commands from fixed arguments; do not interpolate untrusted strings into a shell.chmod 700 "$ssh_dir"Fix: Request the narrowest permission that works; replace wildcards with the exact paths or hosts."""Read a remote file over SSH using SFTP, with optional sudo fallback."""Fix: Build commands from fixed arguments; do not interpolate untrusted strings into a shell.chown -R mcpuser:mcpuser /home/mcpuser/.ssh && \Fix: Request the narrowest permission that works; replace wildcards with the exact paths or hosts."sudo tmux attach-session",Fix: Build commands from fixed arguments; do not interpolate untrusted strings into a shell.# Apply environment variable override for sudo passwordFix: Build commands from fixed arguments; do not interpolate untrusted strings into a shell.-v ~/.ssh:/mounts/ssh-keys:ro \Fix: Stop enumerating or reading credential locations; take secrets from a declared environment variable the user sets on purpose.chown -R mcpuser:mcpuser /mountsFix: Request the narrowest permission that works; replace wildcards with the exact paths or hosts.use_sudo: Use sudo for reading (tries passwordless if no sudo_password provided)Fix: Build commands from fixed arguments; do not interpolate untrusted strings into a shell.logger.debug(f"Executing chmod command: {chmod_cmd}")Fix: Request the narrowest permission that works; replace wildcards with the exact paths or hosts.- SUDO_PASS: Override sudo passwordFix: Build commands from fixed arguments; do not interpolate untrusted strings into a shell.return "", "Could not find session for sudo command", 1Fix: Build commands from fixed arguments; do not interpolate untrusted strings into a shell.sudo_password: Password for sudo commands on Unix/Linux hosts (optional)Fix: Build commands from fixed arguments; do not interpolate untrusted strings into a shell.or sudo_password is provided, falls back to using 'sudo cat' via shell command.Fix: Build commands from fixed arguments; do not interpolate untrusted strings into a shell.chown mcpuser:mcpuser "$ssh_dir"Fix: Request the narrowest permission that works; replace wildcards with the exact paths or hosts.# - ~/.ssh/config:/mounts/ssh-config/config:roFix: Stop enumerating or reading credential locations; take secrets from a declared environment variable the user sets on purpose.reason="Skipping sudo test: SSH_TEST_SUDO_PASSWORD not set"Fix: Build commands from fixed arguments; do not interpolate untrusted strings into a shell.sudo_prefix = "sudo " if use_sudo else ""Fix: Build commands from fixed arguments; do not interpolate untrusted strings into a shell."""Test sudo command with automatic password handling."""Fix: Build commands from fixed arguments; do not interpolate untrusted strings into a shell.session_manager, ssh_config, "sudo -n whoami", timeout=10Fix: Build commands from fixed arguments; do not interpolate untrusted strings into a shell."""Check if we have passwordless sudo access."""Fix: Build commands from fixed arguments; do not interpolate untrusted strings into a shell.# Check if we need sudoFix: Build commands from fixed arguments; do not interpolate untrusted strings into a shell.test_content = "sudo test content"Fix: Build commands from fixed arguments; do not interpolate untrusted strings into a shell.# Create a test file that requires sudo to writeFix: Build commands from fixed arguments; do not interpolate untrusted strings into a shell.sudo_prefix = "sudo " if use_sudo else ""Fix: Build commands from fixed arguments; do not interpolate untrusted strings into a shell.command=f"echo '{test_content}' | sudo tee {test_file}",Fix: Build commands from fixed arguments; do not interpolate untrusted strings into a shell.Cost to the agent
Tokens estimated at four characters each. The tool list is re-read by the agent on every turn, so it is the number to compare between servers that do the same job: ranked across the index.
Known vulnerabilities
No advisories in OSV for mcp-ssh-session@0.2.2 as of 5d ago. This is the package itself, not its dependencies.
What would make this Verified
12 points to 80 · weights: behavior 45%, static 25%, prompt 15%, publisher 15%- Reads credential paths from the home directory≈ +9 on the totalStop enumerating or reading credential locations; take secrets from a declared environment variable the user sets on purpose.
- Prompting user to enter sensitive credentials≈ +9 on the totalStop enumerating or reading credential locations; take secrets from a declared environment variable the user sets on purpose.
- Unclaimed publisher≈ +8 on the totalClaim devnullvoid: a verified publisher gets +50 on publisher trust. It is free and usually instant with GitHub sign-in.
- References a credential file in the home directory≈ +4 on the totalStop enumerating or reading credential locations; take secrets from a declared environment variable the user sets on purpose.
- Privileged sudo command≈ +4 on the totalBuild commands from fixed arguments; do not interpolate untrusted strings into a shell.
- Access to sensitive file paths≈ +4 on the totalStop enumerating or reading credential locations; take secrets from a declared environment variable the user sets on purpose.