I'm attempting to open multiple xterms and run a command as an SAP user via sudo using
pssh. So far, I'm able to run PSSH to a file of servers with no check for keys, open every xterm in the servers in the file list, and sudo to the SAP (ADM) user, but it won't do anything else afterwards.
I've tried many combinations and I'm not sure if my options for the
pssh nor the xterm options are set correctly. Here is what I have now.
pssh -i -h ectsrv -A -O StrictHostKeyChecking=no "export DISPLAY=IP address:0.0; xterm -hold -e "sudo /path/sap_sudo.sh" "
I've tried many combinations: with and without single and double quotes:
xterm -e sudo "cmd1;cmd2;ls;bash" xterm -e sudo "cmd1 && cmd2" xterm -e sudo "cmd1;cmd2; ksh" xterm -e sudo "-tt" "cmd1;cmd2;ls;bash"
I'm completely stuck where
SIDADM> is shown in new windows, but it won't run any commands.