# AWS-SSH
[](https://travis-ci.org/arusahni/aws-ssh) [](https://coveralls.io/github/arusahni/aws-ssh?branch=master)
SSH into your project-specific AWS EC2 instances by name, without having to remember IP addresses & private keys, or a curating a SSH config.
Turn this: ssh -i ~/.ssh/project-key.pem ubuntu@198.51.100.13
Into this: aws-ssh compute
## Getting Started
### Prerequisites
AWS-SSH requires Python 2.7 or greater on a POSIX system. You will also need to have [the AWS CLI](https://aws.amazon.com/cli/) installed and configured.
### Installing
Pip is the recommended method:
`console $ pip install aws-ssh `
I recommend installing this into a virtualenv, and then symlinking the binaries to your PATH. For example:
`console $ mkvirtualenv -p $(which python3) aws-ssh # Python 3 recommended $ pip install aws-ssh # Assuming ~/bin/ is in your $PATH... $ ln -s ~/.virtualenvs/aws-ssh/bin/{aws-ssh,awssh,ssh-ec2,aws-ssh-cli} ~/bin/ $ deactivate `
You should now be able to use AWS-SSH outside of your virtualenv!
### Usage
Once installed, you need to create a project. Projects are collections of EC2 instances that share a common set of parameters. For example, I may be working on the squanch project, with the following instances in my AWS account:
squanch-compute - 198.51.100.13
squanch-web - 198.51.100.14
squanch-data - 198.51.100.15
Assuming I keep my squanch-related code in ~/code/squanch, I will first need to initialize an AWS-SSH project within that directory:
`console $ cd ~/code/squanch $ aws-ssh --init Please provide the full path ot the directory containing all private keys: ~/.ssh/ Please provide a name for this project: squanch Please provide the AWS profile to use: default Please provide the name of the private key used for authentication (including extension): squanch.pem Please provide the prefix for EC2 names: squanch- Please provide the root directory for the project: ~/code/squanch `
This will create an .awssshconfig file in the project root directory. You can manage it under version control to get the team on the same page :-)
Now that AWS-SSH has been configured, time to connect to an instance!
`console $ cd ~/code/squanch $ aws-ssh web # Successful SSH connection to 198.51.100.14 `
Boom.
## Notes
AWS-SSH attempts to guess the username for an instance by testing various usernames. Right now, the sequence of user names is fixed (and based off common AMI usernames). In a future release, this will be configurable.
If your access is dependent on custom routing (e.g., behind a lazy VPN), you may need to abort the connection attempt (via ^C) and manually add a route for the instance.
## Contributing
Contributions welcome! Be sure to use the development package, available under the dev extra.
`console $ git clone git@github.com:arusahni/aws-ssh $ cd aws-ssh $ pip install -e .[dev] `
Metadata
Release files for aws-ssh 0.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| aws-ssh-0.0.2.tar.gz | 10.8 kB | Without provenance | Details for aws-ssh-0.0.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| aws_ssh-0.0.2-py3-none-any.whl | Python 3 | none | any | Details for aws_ssh-0.0.2-py3-none-any.whl |
Total release size: 21.5 kB
Release files / aws-ssh-0.0.2.tar.gz
| Download URL | aws-ssh-0.0.2.tar.gz |
|---|---|
| Size | 10.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
52713c7e97b8a6af70a67069bde5a62ecf5f353c6472c3286c8307b8f25a588c
|
|
BLAKE2b-256 checksum How to use checksums |
ad334a6d62fabe3101afa1fde18761b898dfdcb5b008bb5890a437ad33643a89
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / aws_ssh-0.0.2-py3-none-any.whl
| Download URL | aws_ssh-0.0.2-py3-none-any.whl |
|---|---|
| Size | 10.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
18dad8b8c8eb258d9c7fe29b4d9f8d0c8cd47ee50113035cc5347c7a913c5da2
|
|
BLAKE2b-256 checksum How to use checksums |
74afff9f0b0b50dbf1d8e257c8b97e43325269be19bf0d933d9beb832505b1b6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for aws-ssh 0.0.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.