Basically I have to run a couple commands on the local server, then a couple commands have to be run on a remote server (as su privileges), then a few more commands need to be run locally. I would like to script all this to be initiated from the local server.
For instance, lets say I want to run from a script this command: "sudo touch /etc/afile" or just "touch /etc/afile" if run as root. But I want the script to run on localserver1 and the command should be run on remoteserver1.
Any suggestions?
For instance, lets say I want to run from a script this command: "sudo touch /etc/afile" or just "touch /etc/afile" if run as root. But I want the script to run on localserver1 and the command should be run on remoteserver1.
Any suggestions?
