A simple AWS ec2 host discovery and ssh script
Project description
ssh-ec2
Make ssh to EC2 instances easier
Install:
pip install ssh-ec2
Setup:
Add the following to your shell rc (.bashrc, .bash_profile, .zshrc):
#compdef ssh_ec2
_ssh_ec2() {
eval $(env COMMANDLINE="${words[1,$CURRENT]}" _SSH_EC2_COMPLETE=complete-zsh ssh_ec2)
}
if [[ "$(basename -- ${(%):-%x})" != "_ssh_ec2" ]]; then
autoload -U compinit && compinit
compdef _ssh_ec2 ssh_ec2
fi
Example Usage:
ssh_ec2 select [TAG NAME] [TAG VALUE] [IP ADDRESS|all|random]
Usage: ssh_ec2 [OPTIONS] COMMAND [ARGS]...
Options:
--help Show this message and exit.
Commands:
select
Tab completion for all commands and arguments. If you don't need a specific IP then use random to select one of the hosts at random or all to go to each host in turn.
Note:
If tag names have a :
in them they are replaced with _COLON_
this is due to zsh treating text after a colon as help text
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
ssh-ec2-0.0.2.tar.gz
(4.0 kB
view details)
Built Distribution
ssh_ec2-0.0.2-py3-none-any.whl
(16.9 kB
view details)
File details
Details for the file ssh-ec2-0.0.2.tar.gz
.
File metadata
- Download URL: ssh-ec2-0.0.2.tar.gz
- Upload date:
- Size: 4.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.7.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9a636fe446fab543041fd5c2c549ed2df18d120aca196c683e66b74eb9308a9d |
|
MD5 | 27d44af1c4ac829ae4a300ecdd28e5f7 |
|
BLAKE2b-256 | b58506bf2c7932a5198e1126d59e01351b646bd5261bccfe8a3ffec5a2f65c90 |
File details
Details for the file ssh_ec2-0.0.2-py3-none-any.whl
.
File metadata
- Download URL: ssh_ec2-0.0.2-py3-none-any.whl
- Upload date:
- Size: 16.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.7.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8bf75318c0d70953fc9d466bc8f72d3c5148a36cb08916dca8fa3a9440f3d76b |
|
MD5 | 1659b57942fd9f79e80b57552313433e |
|
BLAKE2b-256 | d645c866cdd4885843adec5e77b5e660443a08e46d394957f11cfcc125a2e3c1 |