this might sound silly but I’m really stuck here…
I want parallel-ssh to preform operations on multiple hosts and I know I have to put their IPs in file hosts.txt, but where is this fabled hosts.txt file? Or if I have to create it, where? Because I keep getting this:
IOError: [Errno 2] No such file or directory: ‘hosts.txt’
You have to create it. one host per line.
create a file called hosts.txt and in the contents have:
then you pass that file in as an option
pssh -h hosts.txt ...That file can have any name really, so long as it’s a list of hostnames. You could save it as myhosts.txt, as an example.
You can create this file where ever you like. If you are on a windows machine you can create it in c:\temp or on a *nix box in /tmp/ or where ever.
then you can go:
pssh -h c:\temp\hosts.txtor…pssh -h /tmp/hosts.txtor…pssh -h c:\temp\myhosts.txt