https://github.com/blwsh/ecssh
Elastic Container SSH - Easily start a shell session in any ECS container.
https://github.com/blwsh/ecssh
aws-ec2 aws-ecs docker ssh
Last synced: 11 months ago
JSON representation
Elastic Container SSH - Easily start a shell session in any ECS container.
- Host: GitHub
- URL: https://github.com/blwsh/ecssh
- Owner: blwsh
- Created: 2020-12-13T03:18:34.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2021-01-20T17:09:28.000Z (over 5 years ago)
- Last Synced: 2025-05-06T17:53:49.061Z (about 1 year ago)
- Topics: aws-ec2, aws-ecs, docker, ssh
- Language: Go
- Homepage: https://blw.sh
- Size: 697 KB
- Stars: 6
- Watchers: 0
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ECSSH

Elastic Container (Service) SSH - Allows you to easily navigate running containers in your ECS clusters and run a shell in them using just one simple command.
# Requirements
* AWS CLI - https://github.com/aws/aws-cli
* EC2 Instances must be in a public subnet have ssh running on open port 22.
* Connecting to an instance in a private subnet with port 22 closed will be possible in future with the addition of AWS SSM support. https://docs.aws.amazon.com/systems-manager/index.html
### Usage
```shell
ecssh --region "" --cluster ""
```
Or via Docker
```shell
docker run --rm -it \
-v ~/.aws:/app/.aws \ # Mounts your AWS config
-v ~/:/app/ \ # The pem file to connect to the instance via SSH
blwsh/ecssh:latest -i /app/ --region
```
*Note in future versions, support for forwarding the host SSH agent and AWS SSM will be included meaning you can omit mounting a .pem file*
### Flags
| Name | Optional | Description |
|---------|-----------|---------------------------------------|
| region | ✔️ | The AWS region for the cluster(s). |
| cluster | ✔️ | The cluster to search for containers. |
### Future releases
* Option to change default entrypoint command for containers.
* Automate adding and removing security groups for port 22 access for specific IP addresses.
* Automate adding ssh keys to ec2 instances.
* See if fargate support is at all possible.