|
| 1 | +cloud-ssh |
| 2 | +========= |
| 3 | + |
| 4 | +Wrapper for ssh which enchance work with cloud providers. |
| 5 | + |
| 6 | +In times of digital clouds, servers come and go, and you barely remember its names and addresses. This tiny tool provide fuzzy search (yeah like SublimeText) for your instances list, based on tags, security groups and names. Here is few examples: |
| 7 | + |
| 8 | +``` |
| 9 | +sh-3.2$ # Lets say i want connect to server called stage-matching |
| 10 | +sh-3.2$ ./cloud-ssh leon@stama |
| 11 | +Found config: /Users/buger/.ssh/cloud-ssh.yaml |
| 12 | +Found clound instance: |
| 13 | +Cloud: granify_ec2 Matched by: aws:autoscaling:groupName=stage-matching Addr: ec2-50-200-40-200.compute-1.amazonaws.com |
| 14 | +
|
| 15 | +Welcome to Ubuntu 12.04 LTS (GNU/Linux 3.2.0-25-virtual x86_64) |
| 16 | +``` |
| 17 | + |
| 18 | +If there are more then 1 server matching your query, it will ask you to choose one: |
| 19 | +``` |
| 20 | +sh-3.2$ # I want to check one of my CouchBase servers |
| 21 | +sh-3.2$ ./cloud-ssh ubuntu@couch |
| 22 | +Found config: /Users/buger/.ssh/cloud-ssh.yaml |
| 23 | +Found multiple instances: |
| 24 | +1) Cloud: granify_ec2 Matched by: Name=couchbase-02 Addr: ec2-50-200-40-201.compute-1.amazonaws.com |
| 25 | +2) Cloud: granify_ec2 Matched by: Name=couchbase-03 Addr: ec2-50-200-40-202.compute-1.amazonaws.com |
| 26 | +3) Cloud: granify_ec2 Matched by: Name=couchbase-04 Addr: ec2-50-200-40-203.compute-1.amazonaws.com |
| 27 | +4) Cloud: granify_ec2 Matched by: Name=couchbase-01 Addr: ec2-50-200-40-204.compute-1.amazonaws.com |
| 28 | +5) Cloud: granify_ec2 Matched by: Name=couchbase-05 Addr: ec2-50-200-40-205.compute-1.amazonaws.com |
| 29 | +Choose instance: 1 |
| 30 | +Welcome to Ubuntu 12.04.4 LTS (GNU/Linux 3.2.0-58-virtual x86_64) |
| 31 | +``` |
| 32 | + |
| 33 | +Nice, right? More over, cloud-ssh can act as full ssh replacement, since it just forward all calls to ssh command. |
| 34 | + |
| 35 | +## Configuration |
| 36 | + |
| 37 | +By default it checks your environment for AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY environment variables. If you want advanced configuration you can create `cloud-ssh.yml` in one of this directories: ./ (current), ~/.ssh/, /etc/ |
| 38 | + |
| 39 | +Note that you can define multiple clouds, per provider, if you have multi-datacenter setup or just different clients. Cloud name will be included into search term, so you can filter by it too! |
| 40 | + |
| 41 | +Right now only 2 data cloud providers supported: Amazon EC2 and DigitalOcean. |
| 42 | + |
| 43 | +Example configuration: |
| 44 | +``` |
| 45 | +gran_ec2: # cloud name, used when searching |
| 46 | + provider: aws |
| 47 | + region: us-east-1 |
| 48 | + access_key: AAAAAAAAAAAAAAAAA |
| 49 | + secret_key: BBBBBBBBBBBBBBBBBBBBBBBBB |
| 50 | +gran_digital: |
| 51 | + provider: digital_ocean |
| 52 | + client_id: 111111111111111111 |
| 53 | + api_key: 22222222222222222 |
| 54 | +``` |
0 commit comments