Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/umegbewe/ec2-ssh
CLI tool to easily connect to EC2 instances via SSH, selected with fzf.
https://github.com/umegbewe/ec2-ssh
aws aws-cli ec2 fzf ssh
Last synced: about 5 hours ago
JSON representation
CLI tool to easily connect to EC2 instances via SSH, selected with fzf.
- Host: GitHub
- URL: https://github.com/umegbewe/ec2-ssh
- Owner: umegbewe
- License: mit
- Created: 2022-08-24T20:28:15.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2023-05-12T13:30:19.000Z (over 1 year ago)
- Last Synced: 2024-06-20T12:50:52.015Z (5 months ago)
- Topics: aws, aws-cli, ec2, fzf, ssh
- Language: Go
- Homepage:
- Size: 19.5 KB
- Stars: 8
- Watchers: 1
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# **ec2-ssh**
Command-line tool to easily connect to Amazon EC2 instances via SSH. It uses **[fzf](https://github.com/junegunn/fzf)** to select instances to connect to, and it can be configured with various flags such as the SSH user, Region to find instances and directory where SSH keys are stored.
# Prerequisites
- Install [FZF](https://github.com/junegunn/fzf#installation)
- Setup AWS credentials https://docs.aws.amazon.com/sdk-for-java/v1/developer-guide/setup-credentials.html## **Install**
- Download [binaries](https://github.com/umegbewe/ec2-ssh/releases)
- Build:
```
go install github.com/umegbewe/ec2-ssh@latest
```## **Usage**
To use this tool, simply run the **`ec2-ssh`** command and follow the prompts to select the EC2 instance you want to connect to. By default, the tool will use the **`ubuntu`** user to connect, and it will look for SSH keys in the **`~/.ssh`** directory. You can use the following options to customize the tool's behavior:
```text
Usage:ec2-ssh [OPTIONS]
Options:
-user: SSH user to login with. Default user is "ubuntu".
-directory: The directory where SSH keys are stored. Default is "~/.ssh".
-region: The region where the EC2 instances are located. Default is "us-east-1".
```For example, to connect to an EC2 instance using the **`ec2-user`** user, SSH keys stored in the **`/home/ubuntu/keys`** directory and region **`us-west-2`**, you could use the following command:
```
ec2-ssh -user ec2-user -directory /home/ubuntu/keys -region us-west-2
```## **License**
This tool is released under the MIT License. See **[LICENSE](https://github.com/umegbewe/ec2-ssh/blob/main/LICENSE)** for more information.