Anyone here used pssh to modify files in place, I've tried attempts like so;
while read line;
do
pssh --inline-stdout -H "$line" "hostname;
sudo sed -i \'s/search domain123.local/search domain123.local domain456.local/g\' /etc/resolv.conf;
sleep 1";
done < <(cat listOfIPs.txt)
Although pssh returns Success status, it doesn't amend resolv.conf on the actual host - am I missing something obvious in the pssh or sed command?
Thanks!