Hi,
I need to login into remote server and execute a shell script over there.
As of now i am making use of ssh command
ssh primUser@135.254.242.2 sh /poll.sh
I am logging in as primUser but unless i change the user to root the script execution on the remote machine is not possible.
Is there a way wherein i can make use of
perl script or anything like that and remotely change the user to root?
ssh primUser@135.254.242.2 su -
The above command is giving me a 'su - Sorry' message.
Can anybody help me to change the login to root on remote machine and execute the script poll.sh on it?