
A simple wrapper to ssh user@host -t command for executing arbitrary commands to AWS AutoScaling Groups and GCP Managed Instance Groups. It uses your environment's aws and gcloud commands, as well as your SSH setup behind the scenes.
This tool has been created primarily for tailing logs from multiple, managed VMs, without going through either CloudWatch Logs (AWS) or Cloud Logging (GCP).
To install using Homebrew:
$ brew install flowerinthenight/tap/g-ssh-cmd
Basic usage looks something like:
# Tail all AWS ASG VMs' system logs:
$ g-ssh-cmd asg my-asg 'journalctl -f' --key ~/.ssh/key.pem
# Tail all GCP MIG VMs' system logs:
$ g-ssh-cmd mig my-mig 'journalctl -f'