New answers tagged

3

Indeed, pssh sounds like the better solution. If you must use parallel it should be fairly simple: pipe the hostnames one per line into a single command that uses {} as a placehold. Eg: consul members | ... awk {'print $2'} | cut -d ":" -f1 | parallel -j 10 sshpass -p "$PASSWORD" ssh -oStrictHostKeyChecking=no -q root@{} "hostname && yum clean all &...


1

Use pssh with ssh host key authentication it's better first, on the local box, as the user to connect with, do ssh-keygen to create a public key then use ssh-copy-id to copy that public key to all the remote servers. then do sometinhg like: pssh -h <(consul members | grep awk {'print $2'} | cut -d ":" -f1) -o /tmp/update-consul-servers -i "yum clean ...



Top 50 recent answers are included