Interactive CLI to connect to AWS EC2 via SSM or SSH-over-SSM, with keyword search and multi-session terminal launch.
Project description
Interactive CLI to connect to AWS EC2 instances via:
SSM Session Manager (shell)
SSH over SSM (with your SSH key)
Multiple sessions in parallel (opens each in a new terminal)
Keyword search across Name/ID/all tag values
Simple, cross-platform, and secure by default.
Features Search instances by keywords (matches Name, InstanceId, and all tag values)
Choose SSM or SSH-over-SSM per connection
Optional strict SSH host key checking (security toggle)
Opens each session in a new terminal window (Linux, macOS, Windows)
Uses your existing AWS credentials (SSO, profiles, env vars)
Validates SSH key path and permissions (Unix)
Requirements AWS account permissions to use SSM Session Manager
Locally installed:
AWS CLI v2
SSM Session Manager plugin
OpenSSH client (ssh)
Python 3.8+
boto3 (installed automatically if using PyPI package)
On Linux/macOS, ensure a terminal emulator exists (e.g., gnome-terminal, xterm, or Terminal.app on macOS). On Windows, PowerShell or Windows Terminal recommended.
Install From source:
Clone this repo and run the script with Python 3.
From PyPI (if published):
pip install ssm-connect
ssm-connect
Usage Run the tool
Optionally enter keywords to filter instances (e.g., “prod web”)
Select an instance
Choose connection type:
SSM (interactive shell)
SSH over SSM (enter SSH key path and user)
For SSH, choose whether to enable strict host key checking
Each session opens in a new terminal; you can open more without restarting the tool
Notes SSH over SSM uses AWS-StartSSHSession and does not require port 22 open in security groups.
Strict host key checking is disabled by default for convenience; enable it for production/security-sensitive use.
The tool does not print or store credentials; it inherits your AWS session from the environment/AWS CLI.
Troubleshooting If “aws” or “ssh” not found: ensure AWS CLI v2 and OpenSSH are on PATH.
If SSO token expired: run aws sso login or refresh your Granted/SSO session.
If SSH key error: ensure the private key exists locally and has correct permissions (chmod 600 on Unix). Avoid cloud-only paths (e.g., OneDrive placeholders).
License Apache License 2.0. See LICENSE for details.
Contributing Issues and PRs are welcome. Please keep changes focused and add brief notes to the README when behavior changes.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ssm_connect-1.0.0.tar.gz.
File metadata
- Download URL: ssm_connect-1.0.0.tar.gz
- Upload date:
- Size: 11.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f3d551a525a9740cc275357e789669893f2ff501a94252fe897317de7387f0d9
|
|
| MD5 |
1eac971a538abab22e8f33d73b0da355
|
|
| BLAKE2b-256 |
381be5a0048d54a5cc90efe2ec375d456a2df7657c344c8a95a12e73b77c8d5a
|
File details
Details for the file ssm_connect-1.0.0-py3-none-any.whl.
File metadata
- Download URL: ssm_connect-1.0.0-py3-none-any.whl
- Upload date:
- Size: 11.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dae3112c9aee5feeda76f6d9c982cc8914829f2aa5b3ba243097ede6c4932390
|
|
| MD5 |
debb645e043dc62aebb9982b3a6a52b7
|
|
| BLAKE2b-256 |
db59469df0945f180bcf0bcd895d27c172c647a7011ef8b2c0723f3998d2491a
|