A lightweight CLI for managing AWS SSM connections, remote command execution, and file transfers — designed to feel like a modern SSH/SCP replacement powered by AWS Systems Manager.
- Features
- Targets
- Global Flags
- Installation
- Requirements
- Target OS support
- Design Goals
- Project Structure
- Roadmap
- Contributing
- Contributors
- License
ssmctl list [--filter <substring>] [--platform linux|windows]Lists all EC2 instances managed by AWS Systems Manager. Instance IDs, Name tags, platform, agent version, and ping status are displayed as a table. Use --output json for structured output.
INSTANCE ID NAME PLATFORM AGENT VERSION STATUS
i-0123456789abcdef0 web-1 Linux 3.2.2086.0 Online
i-0987654321fedcba0 bastion-1 Linux 3.2.2086.0 Online
i-0aabbccddeeff0011 win-app-1 Windows 3.2.2086.0 Offline
Filter examples:
# Substring match on Name tag
ssmctl list --filter web
# Filter by platform
ssmctl list --platform linux
ssmctl list --platform windows
# JSON output
ssmctl list --output jsonRequires ssm:DescribeInstanceInformation and ec2:DescribeInstances permissions.
ssmctl connect <target>Starts an interactive SSM session. Requires the AWS Session Manager plugin.
ssmctl run <target> -- <command>Example:
ssmctl run web-1 -- uname -aStdout and stderr are streamed to your terminal. The exit code of the remote command is propagated.
ssmctl cp ./file.txt <target>:/tmp/file.txtNote: uploads are limited to ~2 MB (SSM
SendCommanddocument size).
ssmctl cp <target>:/var/log/app.log ./app.logNote: downloads are limited to ~36 KB (SSM
GetCommandInvocationoutput size).
ssmctl versionA <target> can be:
- An EC2 instance ID —
i-0123456789abcdef0 - An EC2 Name tag —
web-1
Resolution strategy:
- Input starting with
i-is treated as an instance ID directly. - Everything else is looked up via the EC2
Nametag.
--profile, -p AWS profile (defaults to AWS_PROFILE env var)
--region, -r AWS region
--output, -o Output format: text | json (default: text)
--debug, -d Enable debug logging
--timeout, -t Timeout for remote commands (default: 60s)Pre-built binaries for Linux, macOS (Intel + Apple Silicon), and Windows are attached to every GitHub release.
# Example — adjust version and platform as needed
curl -L https://github.com/rhysmcneill/ssmctl/releases/latest/download/ssmctl-linux-amd64 \
-o /usr/local/bin/ssmctl && chmod +x /usr/local/bin/ssmctlbrew tap rhysmcneill/ssmctl
brew install ssmctl- AWS credentials configured (environment variables,
~/.aws/credentials, or an IAM role) - The target EC2 instance must have the SSM Agent installed and running
- For
connect, the Session Manager plugin must be installed locally
| Command | Linux/macOS targets | Windows targets |
|---|---|---|
connect |
Supported | Supported when the Session Manager plugin is installed locally |
run |
Supported via AWS-RunShellScript |
Not currently supported; Windows targets require AWS-RunPowerShellScript |
cp |
Supported | Not currently supported; transfers rely on POSIX utilities such as cat and base64 |
The run and cp commands currently build shell commands for POSIX-like
targets. When EC2 metadata identifies a Windows target, these commands return a
clear unsupported-target error instead of running a shell command that would fail
remotely. Use connect for Windows targets, or run PowerShell commands through
AWS Systems Manager directly until ssmctl gains native Windows command and
transfer support.
- Simple, ergonomic CLI (inspired by
sshandscp) - No SSH keys or open inbound ports required
- Built entirely on AWS SSM
- Works with existing AWS credentials and config
- Scriptable via
--output json
ssmctl/
├── cmd/ssmctl/ # binary entry point
├── e2e/ # end-to-end tests
├── internal/
│ ├── app/ # application wiring (AWS client setup)
│ ├── cmd/ # Cobra command definitions
│ ├── config/ # flag validation and configuration
│ ├── output/ # text / JSON output formatting
│ ├── ssm/ # SSM and EC2 API calls
│ └── version/ # build-time version variables
├── tools/release/ # release-please configuration
├── go.mod
└── go.sum
-
connectvia SSM Session Manager -
runcommand execution viaSendCommand -
cpupload (local → remote) -
cpdownload (remote → local) - target resolution (instance ID + Name tag)
- structured output (
text/json) - timeout + context handling
- basic error handling and validation
- Homebrew formula
-
ssmctl list— instance discovery with filtering (#50) - shell completion (
bash,zsh,fish) -
--output jsonsupport forconnect
See CONTRIBUTING.md.
MIT License
Thanks to everyone who has contributed to ssmctl!