Skip to main content

awssh

SSH boto3 utility for AWS

Installation

$ aws configure
$ pip install ssh-aws # or pip install --user ssh-aws

Note: The awssh utility is installed in $HOME/Library/Python/2.7/bin which may not be on PATH. Consider adding this directory to PATH.

Requirements

  • Python 2.7

Features

The awssh utility gives you a list of hosts you have access to and preconfigures ssh with the proper key and user. You can filter by instance name. If it matches only one instance you will be logged into it. This utility also allows local and remote port forwarding for SSH tunneling (e.g. ssh -L 9000:imgur.com:80 user@ip_address).

Usage

usage: awsh [-h] [--region REGION] [--users USERS [USERS ...]]
                   [-i KEY_PATH] [-c COMMAND] [-r REMOTE_HOST]
                   [-p REMOTE_PORT] [-l LOCAL_PORT] [--keys KEYS]
                   [--timeout TIMEOUT] [--console-output] [--version]
                   [instance name key word]

SSH into AWS instances. The default user list assumes that your user is Centos, Ubuntu, or ec2-user. 

positional arguments:
  instance name         Optional instance name or key word as filter. If only one instance is found,
                        it will connect to it directly.

optional arguments:
  -h, --help            Show usage message and exit.
  --users USERS [USERS ...]
                        Users to try (centos, ubuntu, and ec2-user are defaults).
  --region REGION       AWS region.
  -i KEY_PATH, --key-path KEY_PATH
                        Specific key path, overrides, --keys
  -c COMMAND, --command COMMAND
                        Translates to ssh -C
  -r REMOTE_HOST, --remote-host REMOTE_HOST
                        Open a tunnel. Translates to ssh -L <local-port
                        >:<remote-host>:<remote-port> <selected-aws-host>
  -p REMOTE_PORT, --remote-port REMOTE_PORT
                        Port to use on the remote host.
  -l LOCAL_PORT, --local-port LOCAL_PORT
                        Port to use on the local host. Get overwritten by
                        remote port if not defined.
  --keys KEYS           Directory of the private keys.
  --timeout TIMEOUT     SSH connection timeout.
  --console-output      Display the instance console out before logging in.
  --version             Returns awsh's version.

  Examples: 
    "awssh --users user1 user2 --region us-east-2 --keys '~/.ssh' instance-name"
    "awssh instance-name --users user1 user2".

Download files

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

Source Distribution

ssh-aws-1.0.3.tar.gz (4.6 kB view details)

Uploaded Source

Built Distribution

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

ssh_aws-1.0.3-py2-none-any.whl (4.9 kB view details)

Uploaded Python 2

File details

Details for the file ssh-aws-1.0.3.tar.gz.

File metadata

  • Download URL: ssh-aws-1.0.3.tar.gz
  • Upload date:
  • Size: 4.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.2.0 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/2.7.10

File hashes

Hashes for ssh-aws-1.0.3.tar.gz
Algorithm Hash digest
SHA256 685a5478cac1ab44e2bd62af6d6576093b107651bdd048da3c85ff5230dd1b87
MD5 6ac74d9b607242d62a4fa18ad36877bb
BLAKE2b-256 ea2e4c589a6517f9e3a27cff63aaf38756f6c04955f4ffdc04d62ef744a9ea7b

See more details on using hashes here.

File details

Details for the file ssh_aws-1.0.3-py2-none-any.whl.

File metadata

  • Download URL: ssh_aws-1.0.3-py2-none-any.whl
  • Upload date:
  • Size: 4.9 kB
  • Tags: Python 2
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.2.0 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/2.7.10

File hashes

Hashes for ssh_aws-1.0.3-py2-none-any.whl
Algorithm Hash digest
SHA256 fb1fdefbe96d17ba8c9911a5dcb1ca13453099d7eb5683cbeb5ab935b544e125
MD5 357c90ab02d26c2e3610a8400198e6de
BLAKE2b-256 7311d5cd3aafa6eb49563634c0bbeab675bd3f219c1cf767d17743288d572a75

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 Sentry Error logging StatusPage Status page