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.1.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.1-py3-none-any.whl (11.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: ssm_connect-1.0.1.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.1.tar.gz
Algorithm Hash digest
SHA256 79a1086ba3e12539ca8fe19d6b8c66aa74cb744f246862005cff9d1a457b66b9
MD5 83292a6bc52aaad2720aedb4a02323a0
BLAKE2b-256 86178baeed7ef6540a7b18a297a9f9dcf4f25457f2a423767fe1ca3d0832c607

See more details on using hashes here.

File details

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

File metadata

  • Download URL: ssm_connect-1.0.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 3299b0d26a7066226e5501d0c61a957d59d6dda02ef7186efa334e3363fa4f8d
MD5 dcb0836e0bd68c17e6bc006852eb8db7
BLAKE2b-256 26a323c2b2ed9c04ee180d5e2f6b456f949021411adff7afd770de9db3779773

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