If you want to execute commands on multiple remote hosts over SSH, just run a tmux session and launch a tab on each host in a loop and execute them.
It's far easier to follow the output and individually deal with prompts.
It's far easier to follow the output and individually deal with prompts.
However, when you just want to execute the same command : https://clustershell.readthedocs.io/en/latest/tools/clush.ht...
cat hosts.txt | parallel --quote --timeout=10 ssh {} 'echo {} $(md5sum ~/.config/file)'
The above command would take a list of hostnames from the hosts.txt file, connect to each one, hash the config file and print out hostnames and hashes in one line per host.command_to_test && exit
in the swarm of tmux tabs and let only the anomalies stay open.
cat hosts.txt | parallel --quote --timeout=10 ssh {} 'echo {} $(md5sum ~/.config/file)'
Also try: parallel --slf hosts.txt --timeout=10 --nonall --tag md5sum .config/file parallel --tmux ...