sssh
is a Bash script designed to streamline the process of using ecs-exec
to execute commands in Amazon ECS Fargate containers. It provides an interactive experience for selecting ECS profiles, clusters, services, containers, and tasks to run shell commands or port forwarding.
This is an actively maintained fork of the original sssh
project. Contributions and feedback are welcome!
Note: Ensure that your AWS CLI session profile is set to output in JSON format before running the script. This is crucial as the script may not function correctly otherwise. You can set the output format to JSON by executing aws configure sso
.
To install sssh
, clone the repository and run the script as follows:
git clone https://github.com/your-username/sssh.git
cd sssh
./sssh
sssh
simplifies the process of connecting to your Amazon ECS Fargate containers. Here is how you can leverage its functionality:
Interactive Shell:
# Launch an interactive shell within your selected ECS container.
# The script will guide you through a series of prompts to select the appropriate
# AWS profile, cluster, service, container, and task.
./sssh
Port Forwarding:
# Set up port forwarding from your local machine to a remote service via the
# selected container. You'll need to provide the remote host's address, the
# remote port, and a local port to forward to.
./sssh --remote-host rds.example.com --remote-port 3306 --local-port 13306
Getting Help:
# Display the help information for additional context and command usage.
./sssh --help
This fork of sssh
is actively maintained. Contributions are welcome and greatly appreciated! If you have a feature request, a bug to report, or a patch that you would like to contribute, please feel free to raise an issue or open a pull request. We aim to foster an inclusive and welcoming community around improving and extending this tool.
Special thanks to the authors and original contributors:
This project is a fork of sssh originally created by Yuki Adachi. It is licensed under the Apache License, Version 2.0. This fork is being actively maintained and may include modifications not present in the original repository. For details on changes made, please see the commit history.