Skip to main content

Simply connect to your "EC2 Instance Connect"-capable AWS EC2 servers using one command

Project description

sshaws

Simply connect to your 'EC2 Instance Connect'-capable AWS EC2 servers using one command. If you use 'EC2 Instance Connect' as described in this article you already noticed that it can become a hassle to connect to instances, especially if you frequently connect to different instances. The sshaws command allows takes care of gathering the necessary information, calling ec2-instance-connect (to register your public key) and, finally, ssh to the instance.

With sshaws, in the best case, connecting to your instances will look like this:

TODO GIF

Requirements

  • python3 and pip
  • configured aws credentials and rights to connect to the instance
  • instance needs to support ec2-instance-connect (AWS AMIs support that + you can install it on your servers)

Installation

pip install sshaws

You might need to use pip3 if you are not in a virtualenv. You might want to install the package in user space (if you don't have sudo rights). E.g.:

pip3 install --user sshaws

Usage

sshaws <instance-id>

<instance-id> should be replaced by something like: i-074126021e7b3e7f5. It can be found in the AWS Console (EC2 view, ECS task description, etc.)

By default it will use the default region, your ssh key at ~/.ssh/id_rsa (private) and ~/.ssh/id_rsa.pub (public) and ec2-user as the username used to connect. See the help output to see how to change these options:

sshaws --help

More Examples

To look for the instance in two different regions use:

sshaws <instance-id> --regions eu-central-1 us-east-1

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

sshaws-0.1.0.tar.gz (3.3 kB view details)

Uploaded Source

Built Distribution

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

sshaws-0.1.0-py3-none-any.whl (4.1 kB view details)

Uploaded Python 3

File details

Details for the file sshaws-0.1.0.tar.gz.

File metadata

  • Download URL: sshaws-0.1.0.tar.gz
  • Upload date:
  • Size: 3.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.6.8

File hashes

Hashes for sshaws-0.1.0.tar.gz
Algorithm Hash digest
SHA256 c72675627cfd80bcc6122a2a05e14cd39afde8fa2341d34cf7d32678e3bc6f0e
MD5 2c30807ede3e6e5c8e0ffaa0aeccb666
BLAKE2b-256 cb2c2fd7e00e72e7be5e9d057b484ba5ac5fb89ce75cff5b6178e491bf85b112

See more details on using hashes here.

File details

Details for the file sshaws-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: sshaws-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 4.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.6.8

File hashes

Hashes for sshaws-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 28536cde926f9f9f4a6fc50ea57c45dd0f23a6a085882829885416f98c0d6d8c
MD5 639acc21da0d4c92561aa3f7daff0497
BLAKE2b-256 b5679380f1b4024ed4d51e1b7c2bda72f54dd5528dce01f0533b2485f1d2e1aa

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