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:
  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-2 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 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.5.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.5-py2-none-any.whl (5.0 kB view details)

Uploaded Python 2

File details

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

File metadata

  • Download URL: ssh-aws-1.0.5.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.5.tar.gz
Algorithm Hash digest
SHA256 0f3d36d4da0bc0b01b5da66d26a53734a59009d609e21f9aa4bcaee23287b67e
MD5 e6f2dd6e1b87993b13cb3c11796e4a3d
BLAKE2b-256 5aeb08e5dcf755affce9e2e5317e99f151a9cbc6a869da42e1d6f33f6a7a45b6

See more details on using hashes here.

File details

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

File metadata

  • Download URL: ssh_aws-1.0.5-py2-none-any.whl
  • Upload date:
  • Size: 5.0 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.5-py2-none-any.whl
Algorithm Hash digest
SHA256 1ff2345d35e13091d79c15ade6bcde5dccb0bdf7dd8152fa327189ed6aa38305
MD5 2704c02455e06656c109fd2a65c1f6a4
BLAKE2b-256 ec2404f853bcdb9e9394dccae7d20d1585715537a55a572b4cd241f99de4fd5e

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