https://github.com/nousefreak/sawsh
SSH wrapper for aws to make your life easier.
https://github.com/nousefreak/sawsh
aws aws-cli aws-ec2 devops-tools hacktoberfest ssh ssh-wrapper
Last synced: 9 months ago
JSON representation
SSH wrapper for aws to make your life easier.
- Host: GitHub
- URL: https://github.com/nousefreak/sawsh
- Owner: NoUseFreak
- License: mit
- Created: 2017-06-07T21:21:27.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2023-04-10T09:44:15.000Z (almost 3 years ago)
- Last Synced: 2024-06-20T16:51:41.497Z (almost 2 years ago)
- Topics: aws, aws-cli, aws-ec2, devops-tools, hacktoberfest, ssh, ssh-wrapper
- Language: Go
- Homepage:
- Size: 77.1 KB
- Stars: 12
- Watchers: 4
- Forks: 5
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# sawsh
[](https://travis-ci.org/NoUseFreak/sawsh)
[](https://github.com/NoUseFreak/sawsh/releases)
[](https://goreportcard.com/report/github.com/nousefreak/sawsh)
[](https://github.com/NoUseFreak/sawsh/blob/master/LICENSE)
[](https://www.buymeacoffee.com/driesdepeuter)
SSH wrapper for aws to make your life easier.
## Features
- Lookup AWS EC2 instances by name.
- Lookup ip by `ip-xxx.xxx.xxx.xxx` format.
- Transparant connect to ip
## Usage
```sh
$ sawsh webserver
```
This example will query AWS for a EC2 instance containing the name `webserver`. It will prompt you with a choise when
more than one result is found.
```sh
$ sawsh webserver
+---+--------------------+-------------+-------------------------------+
| | NAME | IP | LAUNCHTIME |
+---+--------------------+-------------+-------------------------------+
| 0 | prod-webserver-1 | 10.1.1.10 | 2018-02-01 21:13:44 +0000 UTC |
| 1 | prod-webserver-2 | 10.1.2.10 | 2018-03-15 18:57:02 +0000 UTC |
| 2 | prod-webserver-3 | 10.1.3.10 | 2018-04-19 18:04:07 +0000 UTC |
| 3 | prod-webserver-4 | 10.1.1.11 | 2018-02-15 12:36:45 +0000 UTC |
| 4 | prod-webserver-5 | 10.1.2.11 | 2018-06-07 15:54:00 +0000 UTC |
| 5 | prod-webserver-6 | 10.1.3.11 | 2018-06-07 15:54:00 +0000 UTC |
+---+--------------------+-------------|-------------------------------+
Pick a number: 1
Connecting to 10.1.2.10 ...
```
```
$ sawsh -h
Query and connect to ec2 instances
Usage:
sawsh [flags]
sawsh [command]
Available Commands:
connect Connect to an instance
help Help about any command
list List instances
Flags:
-d, --debug Enable debugging
-h, --help help for sawsh
--ssm Try connecting using AWS Service Manager
-v, --verbosity string Log level (debug, info, warn, error, fatal, panic (default "info")
Use "sawsh [command] --help" for more information about a command.
```
## Install
### Official release
Download the latest [release](https://github.com/NoUseFreak/sawsh/releases).
```bash
brew install nousefreak/brew/sawsh
```
or using curl
```bash
curl -sL http://bit.ly/gh-get | PROJECT=NoUseFreak/sawsh bash
```
### Build from source
```sh
$ git clone https://github.com/NoUseFreak/sawsh.git
$ cd sawsh
$ make
$ make install
```
### Upgrade
To upgrade to the latest repeat the install step.
## Configure
Setup sure your [aws-cli](http://docs.aws.amazon.com/cli/latest/userguide/cli-chap-getting-started.html) is setup. That user needs `ec2:Describe*` permissions.
### Suggestion
It may be useful to setup some aliases if you use multiple aws accounts or want it to run with a non standard profile.
```sh
$ alias prod_ssh='AWS_PROFILE=prod sawsh'
```
## License
[](https://app.fossa.io/projects/git%2Bgithub.com%2FNoUseFreak%2Fsawsh?ref=badge_large)