I am trying to run the same command on multiple servers.
Each server is password authenticated, so I exported SSHPASS.
From option 2 on, --onall
is added and commands start to fail.
parallel -S 1/user:@ip echo ::: foo
shows foo successfully (looks like it uses sshpass automatically?)parallel -S 1/user:@ip,1/user:@ip2 --onall echo ::: foo
hangs with no responseparallel --ssh "sshpass -e ssh" -S 1/user:@ip,1/user:@ip2 --onall echo ::: foo
givesPermission denied, please try again.
twice (This is the same error when I purposely give the wrong password in a normalssh user@ip
command, making me think using--oncall
stops sending the correct, or any password)parallel --ssh "sshpass -e ssh" --slf iplist --onall echo ::: foo
shows the same output as point 3.iplist
is the newline separated version of the ips in option 2 and 3, i’m assuming -slf does exactly the same as -S.
Questions
- How do I run the same command on multiple servers considering it expects a password?
- Why does –onall make the terminal hang with no response? (Is there any interactive waiting going on under the hood)
- How to I collect the stdout and stderr results from running the same command in each server back onto the computer that ran parallel together in a single file?