Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ssm_connect-1.0.2.tar.gz (11.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ssm_connect-1.0.2-py3-none-any.whl (11.4 kB view details)

Uploaded Python 3

File details

Details for the file ssm_connect-1.0.2.tar.gz.

File metadata

  • Download URL: ssm_connect-1.0.2.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

Hashes for ssm_connect-1.0.2.tar.gz
Algorithm Hash digest
SHA256 6460fd6d11718a6bd88302c55386e69c73701ecabb3e40e4f99231cdda66aded
MD5 ceca2cc25e9c1ca51076c2b9b079e86f
BLAKE2b-256 5906bb21576ecf5e3d931edca82dc70c063aee038c2507a2c8d6084eab32b350

See more details on using hashes here.

File details

Details for the file ssm_connect-1.0.2-py3-none-any.whl.

File metadata

  • Download URL: ssm_connect-1.0.2-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

Hashes for ssm_connect-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 c173fefd1b5c9f1a95ebfc63b58bdb8039b2a37b204d2821bd40748660390bf9
MD5 68e97e501b636fe756ae4da1cb174000
BLAKE2b-256 67b3b832659997681ff168bd164adb90d1b8fdf656b8d6af9c8080016ecfdcfa

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page