A tool that makes easy to ssh into AWS EC2 servers
There's a blog post at theheartbit.com with some useful examples of using it:
$ gem install aws-ssh
$ bundle exec awssh --help
awssh - a tool that makes easy to ssh into AWS EC2 servers
Usage: awssh [hostname regex]
Examples:
$ awssh prod.*app2
... will SSH into the instance and you will see:
user@prod-rails-app4~$
$ awssh --show-only --stack qa -u worker
... will show all instances registered in QA stack of Opsworks
ssh worker@10.20.30.40 => MyApp QA - qa-rails-app
ssh worker@10.20.30.41 => MyApp QA - qa-sidekiq
# All hosts in one-line (suitable for CSSH):
worker@10.20.30.40 worker@10.20.30.41
Options:
-s, --stack AWS OpsWorks Stack name regex. E.g: `-s prod` will match "Production" stack name
-p, --profile AWS config profile name. Default: profile set in .awssh file
-r, --region AWS region. E.g: us-east-1. Default: region set in .awssh file
-u, --user SSH username to use. Default: user set in .awssh file or current machine user
-so, --show-only Only show the matched hosts instead of ssh. Default: false
-cs, --csensitive Use case-sensitive for regex matching. Default: false
-v, --verbose Verbose mode. Default: false
--help Shows help
Use the .awssh as template to set default options.
- Fork it ( https://github.com/buzzstarter/awssh/fork )
- Create your feature branch (
git checkout -b my-new-feature) - Commit your changes (
git commit -am 'Add some feature') - Push to the branch (
git push origin my-new-feature) - Create a new Pull Request
Please see LICENSE for licensing details.