|
|
|
|
|
by aaronem
4497 days ago
|
|
> I use tmux with a script so that I can ssh into multiple nodes and broadcast the same commands to them all at the same time. I sometimes need to do this with multiple VMs. I'm really, really not in favor of bash scripting, but I've found the following to suffice, without the tmux dependency: for host in box1 box2 box3; do ssh $host 'command; command; command'; done
(This presumes you've set up ssh-agent or are using passphraseless keys and suitable stanzas in ~/.ssh/config; adjust to taste if not.)I'd never heard of using tmux in this fashion before. Is it that the task sufficiently resembles a nail, or does tmux provide some unique benefit here? |
|