ssh-docker-exec

Execute shell commands inside Docker containers via SSH with command allowlists.

6|Updated Apr 17, 2026
One-click install
npx skills add https://github.com/Nightreaver/python-ssh-mcp --skill ssh-docker-exec
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ssh-docker-exec
Source: https://github.com/Nightreaver/python-ssh-mcp/tree/main/skills/ssh-docker-exec
Command: npx skills add https://github.com/Nightreaver/python-ssh-mcp --skill ssh-docker-exec

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

This Skill allows you to run commands inside Docker containers, providing a secure and controlled environment for executing operations within the container's context.

Core Features & Use Cases

  • Container Command Execution: Run arbitrary shell commands inside a specified Docker container.
  • Interactive Execution: Execute commands that require input from the user.
  • Timeouts and Safety: Set timeouts for command execution and restrict commands to those allowed in the command_allowlist.
  • Use Case: Use this Skill to perform administrative tasks or run scripts within a Docker container on a remote host.

Quick Start

Execute a command inside a Docker container named 'postgres' on host 'docker1'.

Frequently Asked Questions about ssh-docker-exec

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I execute shell commands inside Docker containers on a remote host?

To execute shell commands inside Docker containers on a remote host, this Skill leverages the host's SSH connection. It provides a secure, controlled environment for running operations within the container's context.

How can I securely run scripts in a Docker container without exposing the system to arbitrary commands?

You can securely run scripts in a Docker container by applying argv-validation for container names and configuring a command allowlist. These features restrict execution to approved operations, preventing unauthorized command execution within the container.

Can I run interactive commands inside Docker containers using an SSH connection?

Yes, you can run interactive commands inside Docker containers using an SSH connection. This Skill supports interactive execution, allowing commands that require direct input from the user to be processed within the container's context.

Does this method for Docker command execution support setting timeouts for long-running scripts?

Yes, this method for Docker command execution supports setting timeouts for long-running scripts. You can configure execution timeouts to prevent scripts from running indefinitely and ensure controlled administrative task completion.

What are the limitations of using SSH to execute commands inside Docker containers?

Limitations of using SSH to execute commands inside Docker containers include dependency on the host's SSH connection and restriction to the `command_allowlist`. You must validate container names via argv-validation, limiting execution to explicitly permitted shell commands.