{"id":40310784,"url":"https://github.com/missingcharacter/ec2-tmux-cssh","last_synced_at":"2026-01-20T06:34:23.563Z","repository":{"id":55483495,"uuid":"324443306","full_name":"missingcharacter/ec2-tmux-cssh","owner":"missingcharacter","description":"tmux cluster ssh to multiple ec2 instances via bastion host","archived":false,"fork":false,"pushed_at":"2025-06-25T23:24:20.000Z","size":84,"stargazers_count":0,"open_issues_count":2,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-06-26T00:28:31.170Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/missingcharacter.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-12-25T22:34:20.000Z","updated_at":"2025-03-24T17:00:45.000Z","dependencies_parsed_at":"2024-04-07T03:31:31.908Z","dependency_job_id":"da80b56b-10fb-4035-8a55-f8c6e654a9e7","html_url":"https://github.com/missingcharacter/ec2-tmux-cssh","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/missingcharacter/ec2-tmux-cssh","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/missingcharacter%2Fec2-tmux-cssh","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/missingcharacter%2Fec2-tmux-cssh/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/missingcharacter%2Fec2-tmux-cssh/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/missingcharacter%2Fec2-tmux-cssh/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/missingcharacter","download_url":"https://codeload.github.com/missingcharacter/ec2-tmux-cssh/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/missingcharacter%2Fec2-tmux-cssh/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28597647,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-20T02:08:49.799Z","status":"ssl_error","status_checked_at":"2026-01-20T02:08:44.148Z","response_time":117,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-01-20T06:34:22.759Z","updated_at":"2026-01-20T06:34:23.544Z","avatar_url":"https://github.com/missingcharacter.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ec2-tmux-cssh\n\n## Overview\n\ntmux cluster ssh to multiple ec2 instances\n\n## Requirements\n\n- AWS access\n  - EC2 only to [DescribeInstances](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeInstances.html)\n  - ECS functionality requires:\n    - [DescribeInstances](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeInstances.html)\n    - [ListClusters](https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_ListClusters.html)\n    - [ListServices](https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_ListServices.html)\n    - [ListTasks](https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_ListTasks.html)\n    - [DescribeTasks](https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_DescribeTasks.html)\n    - [DescribeContainerInstances](https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_DescribeContainerInstances.html)\n- Private ssh keys for the servers you will try to connect to in `~/.ssh`\n- [file](https://man7.org/linux/man-pages/man1/file.1.html) in your `${PATH}`\n- [tmux-cssh](https://github.com/zinic/tmux-cssh/blob/042fdec2dc51bcfe62499e72f589dc9c146ab71a/tmux-cssh) in your `${PATH}`\n  - [tmux](https://github.com/tmux/tmux/wiki) in your `${PATH}`\n  - [ssh](https://www.openssh.com/) in your `${PATH}`\n- [poetry](https://github.com/python-poetry/poetry)\n\n## Before first run\n\n1. `poetry install`\n\n## How to use\n\n### Example: Only providing use bastion option\n\n```\n$ cd /path/to/this/repository\n$ AWS_PROFILE=my-aws-profile poetry run python ./ec2-tmux-cssh.py --use-bastion\n[?] What tag_key should I use to find instances?: Name\n \u003e Name\n   Role\n   aws:autoscaling:groupName\n   aws:cloudformation:logical-id\n   aws:cloudformation:stack-id\n   aws:cloudformation:stack-name\n   aws:ec2launchtemplate:id\n   aws:ec2launchtemplate:version\n\n[?] What Name value should I use to find instances?: qa-ecs-cluster\n \u003e qa-ecs-cluster\n   rabbitmq\n   ecs-cluster\n\n[?] Which private key should I use for the hosts?: /Users/macuser/.ssh/qa.pem\n + README\n   /Users/macuser/.ssh/id_ed25519\n   /Users/macuser/.ssh/prod-bastion.pem\n   /Users/macuser/.ssh/prod.pem\n   /Users/macuser/.ssh/qa-bastion.pem\n \u003e /Users/macuser/.ssh/qa.pem\n\n[?] Which ssh user should I use for the hosts?: ec2-user\n   centos\n \u003e ec2-user\n   ubuntu\n\n[?] What tag_key should I use to find bastions?: Role\n   Name\n \u003e Role\n   aws:autoscaling:groupName\n   aws:cloudformation:logical-id\n   aws:cloudformation:stack-id\n   aws:cloudformation:stack-name\n   aws:ec2launchtemplate:id\n   aws:ec2launchtemplate:version\n\n[?] What Role value should I use to find bastions?: bastion\n   DB\n \u003e bastion\n\n[?] Which bastion should I proxy through?: qa-bastion\n   prod-bastion\n \u003e qa-bastion\n   stage-bastion\n\n[?] Which private key should I use for the bastion host?: /Users/macuser/.ssh/qa-bastion.pem\n   /Users/macuser/.ssh/id_ed25519\n   /Users/macuser/.ssh/prod-bastion.pem\n   /Users/macuser/.ssh/prod.pem\n \u003e /Users/macuser/.ssh/qa-bastion.pem\n   /Users/macuser/.ssh/qa.pem\n\n[?] Which ssh user should I user for the bastion host?: ubuntu\n   centos\n   ec2-user\n \u003e ubuntu\n\nI will tmux-cssh through bastion qa-bastion to these IPs: ['10.10.21.104', '10.10.21.230', '10.10.21.223', '10.10.20.118', '10.10.20.83', '10.10.20.39']\n* Connecting 'ssh  -o ProxyCommand='ssh -i /Users/macuser/.ssh/qa-bastion.pem ubuntu@SomePublicIP -W %h:%p' -i /Users/macuser/.ssh/qa.pem ec2-user@10.10.21.104'\n* Connecting 'ssh  -o ProxyCommand='ssh -i /Users/macuser/.ssh/qa-bastion.pem ubuntu@SomePublicIP -W %h:%p' -i /Users/macuser/.ssh/qa.pem ec2-user@10.10.21.230'\n* Connecting 'ssh  -o ProxyCommand='ssh -i /Users/macuser/.ssh/qa-bastion.pem ubuntu@SomePublicIP -W %h:%p' -i /Users/macuser/.ssh/qa.pem ec2-user@10.10.21.223'\n* Connecting 'ssh  -o ProxyCommand='ssh -i /Users/macuser/.ssh/qa-bastion.pem ubuntu@SomePublicIP -W %h:%p' -i /Users/macuser/.ssh/qa.pem ec2-user@10.10.20.118'\n* Connecting 'ssh  -o ProxyCommand='ssh -i /Users/macuser/.ssh/qa-bastion.pem ubuntu@SomePublicIP -W %h:%p' -i /Users/macuser/.ssh/qa.pem ec2-user@10.10.20.83'\n* Connecting 'ssh  -o ProxyCommand='ssh -i /Users/macuser/.ssh/qa-bastion.pem ubuntu@SomePublicIP -W %h:%p' -i /Users/macuser/.ssh/qa.pem ec2-user@10.10.20.39'\n[exited]\n```\n\n### All options below\n\n```shell\n$ poetry run python ec2-tmux-cssh.py --help\nUsage: ec2-tmux-cssh.py [OPTIONS]\n\nOptions:\n  --is-ecs                   Find ec2 instances where ecs service runs on\n  --ecs-cluster TEXT         ECS Cluster where ECS Service runs on\n  --ecs-service TEXT         ECS Service we want to find EC2 instances for\n  --hosts-tag-key TEXT       Tag key to find hosts with\n  --hosts-tag-value TEXT     Tag value to find hosts with\n  --hosts-ssh-key TEXT       SSH Private Key for hosts\n  --hosts-user TEXT          SSH user for hosts\n  --use-bastion              Proxy SSH through a bastion host\n  --bastions-tag-key TEXT    Tag key to find bastions with\n  --bastions-tag-value TEXT  Tag value to find bastions with\n  --bastion-name TEXT        Bastion EC2 Name\n  --bastion-ssh-key TEXT     SSH Private Key for bastion\n  --bastion-user TEXT        SSH user for bastion\n  --help                     Show this message and exit.\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmissingcharacter%2Fec2-tmux-cssh","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmissingcharacter%2Fec2-tmux-cssh","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmissingcharacter%2Fec2-tmux-cssh/lists"}