Skip to main content

AWS SSH Utils

Version License Supported Python Versions

uvx aws-ssh-utils

uvx aws-ssh-utils app  # optional - `app` is default.
uvx aws-ssh-utils ec2
uvx aws-ssh-utils emr
uvx aws-ssh-utils emr-all

# Also exposed as `aws_ssh`
uvx --from aws-ssh-utils aws_ssh

This allows you to interactively SSH to an EC2 instance, EMR instance, or all EMR instances with TMUX.

It utilizes questionary to ask you which instance you want to connect to.

App

Terminal UI to browse EC2 instances and EMR clusters, with SSM or SSH shells in tabs. It's the default command, so aws_ssh and aws_ssh -p my-profile launch it too. Each connection tries, in order: ~/.ssh/config, a keyless AWS SSM shell, opkssh (via instance/cluster tags), the instance's EC2 key found in ~/.ssh, then your default keys/ssh-agent. SSM uses aws ssm start-session --target INSTANCE_ID with the selected profile and region. It requires the AWS CLI, session-manager-plugin, and Session Manager access to the instance, but no SSH key, SSH server, or inbound port 22. The shell runs as the Session Manager configured user (usually ssm-user); SSH usernames and key options only apply to SSH connections. The ec2 and emr commands use the same connection order; emr-all still uses SSH in tmux. For SSH connections, unknown host keys are accepted and appended to ~/.ssh/known_hosts; changed host keys are rejected.

$ aws_ssh app --help
Usage: aws_ssh app [OPTIONS]

  Browse EC2 instances and EMR clusters, and open SSM or SSH shells in tabs.

Options:
  -p, --profile TEXT          Which AWS profile to use
  -r, --region TEXT           Which AWS region to use
  --scrollback INTEGER RANGE  Lines of scrollback per shell. Defaults to your
                              tmux or Windows Terminal setting, else 1000.
                              [x>=0]
  --help                      Show this message and exit.

Scroll back with the mouse wheel or shift+PgUp/shift+PgDn; typing jumps back to the prompt. F12 shows/hides the sidebar, ctrl+w closes a failed tab, ctrl+q quits. Every other key goes to the focused shell. Logs are viewable with textual console.

To keep diagnostics and crash tracebacks in a file, use the global --log-file option:

aws-ssh-utils --log-file ./aws-ssh.log --verbose --profile my-profile
# Also works before an explicit command:
aws-ssh-utils --log-file ./aws-ssh.log ec2 --profile my-profile

Alternatively, set AWS_SSH_LOG_FILE to the file path. Logs append across runs and rotate at 10 MB, keeping up to three rotated files. --verbose includes debug diagnostics; --quiet only suppresses console logging. File logs include the version, source location, and error tracebacks, without local variable dumps or a recording of shell input/output.

EC2

Select an instance from an interactive list. You can filter the instances by name.

$ aws_auth ec2 --help
Usage: aws_ssh ec2 [OPTIONS]

  Asks user which EC2 instance they want to connect to, then opens an
  interactive SSM or SSH session to the instance

Options:
  -p, --profile TEXT    Which AWS profile to use
  -r, --region TEXT     Which AWS region to use
  -u, --user TEXT       Which user to connect as
  --private / --public  Connect to the instance's private or public IP
  -k, --key-file FILE   Which key file to use to connect
  --scrollback INTEGER RANGE
                        Lines of scrollback per shell. Defaults to your tmux or
                        Windows Terminal setting, else 1000.  [x>=0]
  --help                Show this message and exit.

EMR

Select the EMR cluster, instance group, and instance to connect to.

$ aws_ssh emr --help
Usage: aws_ssh emr [OPTIONS]

  Asks user which Cluster and EC2 instance they want to connect to, then opens an interactive SSM or SSH session to the instance

Options:
  -p, --profile TEXT    Which AWS profile to use
  -r, --region TEXT     Which AWS region to use
  -u, --user TEXT       Which user to connect as
  --private / --public  Connect to the instance's private or public IP
  -k, --key-file FILE   Which key file to use to connect
  --scrollback INTEGER RANGE
                        Lines of scrollback per shell. Defaults to your tmux or
                        Windows Terminal setting, else 1000.  [x>=0]
  --help                Show this message and exit.

EMR All

Select the EMR cluster to connect to. Then creates a new TMUX session with a window per instance. Each window will have an SSH connection to that instance open.

$ aws_ssh emr-all --help
Usage: aws_ssh emr-all [OPTIONS]

  Asks user which Cluster and EC2 instance they want to connect to, Then
  prints a tmux cli statement that will open a new session with a window per
  ec2 instance with ssh shell already opened.

Options:
  -p, --profile TEXT    Which AWS profile to use
  -r, --region TEXT     Which AWS region to use
  -u, --user TEXT       Which user to connect as
  --private / --public  Connect to the instance's private or public IP
  -k, --key-file FILE   Which key file to use to connect
  --help                Show this message and exit.

Metadata

Release files for aws-ssh-utils 0.3.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for aws-ssh-utils 0.3.2
File Size Uploaded Provenance Actions
aws_ssh_utils-0.3.2.tar.gz 31.1 kB Without provenance Details for aws_ssh_utils-0.3.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for aws-ssh-utils 0.3.2
File Interpreter ABI Platform Actions
aws_ssh_utils-0.3.2-py3-none-any.whl Python 3 none any Details for aws_ssh_utils-0.3.2-py3-none-any.whl

Total release size: 67.9 kB

Release files / aws_ssh_utils-0.3.2.tar.gz

Download URL aws_ssh_utils-0.3.2.tar.gz
Size 31.1 kB
Tags Source
SHA-256 checksum
How to use checksums
c22a108a08cf96b437f67bed1368c07b9299191b8143ddb78a485bebedb28873
BLAKE2b-256 checksum
How to use checksums
491c0e1073480a50b36eceb7bd9d291b09352029d3318ccd86ab1fda00493c6d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via Hatch/1.18.1 {"ci":null,"cpu":"AMD64","implementation":{"name":"CPython","version":"3.14.6"},"installer":{"name":"hatch","version":"1.18.1"},"openssl_version":"OpenSSL 3.5.7 9 Jun 2026","python":"3.14.6","system":{"name":"Windows","release":"11"}} HTTPX2/2.13.1

Release files / aws_ssh_utils-0.3.2-py3-none-any.whl

Download URL aws_ssh_utils-0.3.2-py3-none-any.whl
Size 36.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6c3eb6a8ec0cb675f2aed49edca94b15025fd17f29db3c2f1de5189e966385c0
BLAKE2b-256 checksum
How to use checksums
0e1c73c363ceed779ba5db2888287ca1802782e2e4aa61c15089f8fba78c7f22
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via Hatch/1.18.1 {"ci":null,"cpu":"AMD64","implementation":{"name":"CPython","version":"3.14.6"},"installer":{"name":"hatch","version":"1.18.1"},"openssl_version":"OpenSSL 3.5.7 9 Jun 2026","python":"3.14.6","system":{"name":"Windows","release":"11"}} HTTPX2/2.13.1

Security for aws-ssh-utils 0.3.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page