Skip to content

Instantly share code, notes, and snippets.

View Ahmadposten's full-sized avatar

Posten Ahmadposten

View GitHub Profile
@Ahmadposten
Ahmadposten / aws_autoscaling_multi_ssh.sh
Last active May 4, 2019 11:00
Use tmux to ssh to all instances of an AWS autoscaling group and execute commands simultaneously.
#!/bin/bash
#
# _ _ _
# ____ | | | | | |
# / __ \ __ _| |__ _ __ ___ __ _ __| |_ __ ___ ___| |_ ___ _ __
# / / _` |/ _` | '_ \| '_ ` _ \ / _` |/ _` | '_ \ / _ \/ __| __/ _ \ '_ \
# | | (_| | (_| | | | | | | | | | (_| | (_| | |_) | (_) \__ \ || __/ | | |
# \ \__,_|\__,_|_| |_|_| |_| |_|\__,_|\__,_| .__/ \___/|___/\__\___|_| |_|
# \____/ | |
# |_|