On March 13, 2019 7:52:21 PM UTC, Prasu S <[email protected]> wrote:
>We would like to run a restart script on Unix server(test) from 
>Jenkins(windows) using sudo commands? Is this possible in Jenkins? What
>are 
>the steps involved? Thanks in Advance 

More or less same as you would do it manually: ssh onto the server (name + 
pass, or name + sshkey) as a certain unprivileged user; have /etc/sudoers set 
up on the server to allow needed operations (or "ALL") to this user, and have a 
shell step calling sudo and those commands. On Jenkins side, you can use SSH 
Agent plugin to export one or more credentials (e.g. username + ssh key) saved 
in Jenkins master config so subsequent ssh commands in the job would use those 
safely to log into the server.

Jim 
--
Typos courtesy of K-9 Mail on my Android

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-dev/FC993DBE-A884-4321-B762-84A3D1CDDFBD%40cos.ru.
For more options, visit https://groups.google.com/d/optout.

Reply via email to