I need to run a local script on remote servers. Running script to run in parallel is important.
[ec2-user@ip-172-31-43-140 ~]$ cat hosts.txt
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[ec2-user@ip-172-31-43-140 ~]$ cat hosts.txt | xargs -I {} ssh {} -T 'bash -s' < ./file.sh
ssh: Could not resolve hostname #!/bin/sh: Name or service not known
xargs: ssh: exited with status 255; aborting
[ec2-user@ip-172-31-43-140 ~]$