I have recently started using Jenkins for integration. All was well until I was running jobs on master node without shell command but I have to run jobs on master as well as
You just need to run the shell command on Linux machine using Root privileges from Jenkins.
Steps :
1) sudo vi /etc/sudoers
2) Add line :
jenkins ALL=NOPASSWD:/path of script/
3) From Jenkins,run the script on remote shell using sudo .
for eg : sudo ps -ef
4) Build Jenkins job now. This job runs the script on Linux machine using root privileges.