Thank you Jim for your response. It worked !

On Thursday, March 14, 2019 at 5:10:22 AM UTC-4, Jim Klimov wrote:

> On March 13, 2019 7:52:21 PM UTC, Prasu S <[email protected] <javascript:>> 
> 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/d6cc1f70-1275-4a20-98fb-04d1640bd440%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to