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.

Version update

$ echo y | pip uninstall ssh-aws
$ pip install --no-cache --user ssh-aws
$ awssh --version

Requirements

  • Python 2.7

Features

The awssh utility gives you a list of aws instances 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>). By default, ssh command is executed with the -A option, which enables forwarding the authentication agent connection. This is particularly useful when using a single access point such as a jump server. In addition, if an instance without an external IP is selected, the utility attempts to find a bastion server and ssh with the -t option (e.g. ssh -A ubuntu@<bastion> -t ssh <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:
  filter                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 (us-east-1 by default)..
  -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.
                        Equivalent 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 (~/.ssh by default).
  --timeout TIMEOUT     SSH connection timeout.
  --console-output      Display the instance console out before logging in.
  --version             Returns awssh's version.

  Examples:
    "awssh --region us-east-2"
    "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-2.0.4.tar.gz (5.3 kB view details)

Uploaded Source

Built Distributions

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

ssh_aws-2.0.4-py3-none-any.whl (6.4 kB view details)

Uploaded Python 3

ssh_aws-2.0.4-py2-none-any.whl (5.6 kB view details)

Uploaded Python 2

File details

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

File metadata

  • Download URL: ssh-aws-2.0.4.tar.gz
  • Upload date:
  • Size: 5.3 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-2.0.4.tar.gz
Algorithm Hash digest
SHA256 a5cd4dda670b5a97065231f48a1750c8a1035995f26b1c484e0a5f38da960714
MD5 a517a998acd1edb9a72bc8a1419fe19a
BLAKE2b-256 73f74ca4dcbf08ac7e15919b20f47caad8ebcf65ea771a4ba30a8b08e1034e11

See more details on using hashes here.

File details

Details for the file ssh_aws-2.0.4-py3-none-any.whl.

File metadata

  • Download URL: ssh_aws-2.0.4-py3-none-any.whl
  • Upload date:
  • Size: 6.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/41.0.1 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.5.7

File hashes

Hashes for ssh_aws-2.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 09d8567285f601501df9eb2fbfb76fc4863cd386b80c02030f62dcebd4962199
MD5 83c5765b974f012b3c50864bde09df80
BLAKE2b-256 702e00468a24ab05b14febcaffc6773bc69086b90e6307f74dd7867bb17558d7

See more details on using hashes here.

File details

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

File metadata

  • Download URL: ssh_aws-2.0.4-py2-none-any.whl
  • Upload date:
  • Size: 5.6 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-2.0.4-py2-none-any.whl
Algorithm Hash digest
SHA256 2fee629816c2eabc3816fe2aa2cea8d4eeeb059b98c811d62848bfc18a63ace0
MD5 ade7fc90841a90ac6ca8e7505620a3d7
BLAKE2b-256 8b738b3693011e369a485335d8a6cf4a4bd5c8670069de64d2fdcf7257c0ca5e

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