1. No, the channel protocol can use ssh but doesn't have to, the transport layer is further down in the stack. The actual execution of the command is performed on the agent/slave bu the slave.jar process and the request to do so is a command sent over the remoting channel from the master, what you see on line 95 [1] is a helper method to sent that command to the slave.jar process on the agent.
[1] https://github.com/jenkinsci/jenkins/blob/master/core/src/main/java/hudson/tasks/CommandInterpreter.java#L95 On Fri, Jun 10, 2016 at 11:51 AM, 李立泓 <[email protected]> wrote: > Thank you for your answer.I debug begin CommandInterpreter.perform ,found > that shell.buildCommandLine return [/bin/sh, -xe, > /tmp/hudson3908940237320515344.sh] > > Now I have two questions. > > 1.slave execute shell , does it the equivalent of running "ssh > slavehost command..." ? > 2.Slave Executing the Remote Request. Which method is the specific > implementation of the slave side,I didn't find like "ssh slavehost > command..." implementation method on the remoting(slave.jar) project > > 在 2016年6月10日星期五 UTC+8下午4:58:09,Robert Sandell写道: >> >> >> https://github.com/jenkinsci/jenkins/blob/master/core/src/main/java/hudson/tasks/Shell.java >> >> https://github.com/jenkinsci/jenkins/blob/master/core/src/main/java/hudson/tasks/CommandInterpreter.java#L67 >> <https://www.google.com/url?q=https%3A%2F%2Fgithub.com%2Fjenkinsci%2Fjenkins%2Fblob%2Fmaster%2Fcore%2Fsrc%2Fmain%2Fjava%2Fhudson%2Ftasks%2FCommandInterpreter.java%23L67&sa=D&sntz=1&usg=AFQjCNGx4GKmvZsk8aobANIUSrzUZNS2fA> >> >> /B >> >> On Fri, Jun 10, 2016 at 7:11 AM, 李立泓 <[email protected]> wrote: >> >>> >>> <https://lh3.googleusercontent.com/-4bGT-VtYDLQ/V1pL4M7p3PI/AAAAAAAAAAw/hnFLnnEK5bg8vjPcGQL4HS3oy36bfOnRwCLcB/s1600/20160610121249.png> >>> >>> >>> >>> when slave execute shell,I found that it maybe a non interactive non >>> login shell >>> >>> I check some information,it does the equivalent of running "ssh >>> slavehost command..." >>> >>> I check <a href="https://github.com/jenkinsci/remoting"> >>> https://github.com/jenkinsci/remoting</a>,as slave.jar,but I no find >>> how slave execute shell command >>> >>> Where is the implementation of the slave execute shell command source >>> code? >>> >>> -- >>> 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/df607837-2891-416a-922a-9f5e43934722%40googlegroups.com >>> <https://groups.google.com/d/msgid/jenkinsci-dev/df607837-2891-416a-922a-9f5e43934722%40googlegroups.com?utm_medium=email&utm_source=footer> >>> . >>> For more options, visit https://groups.google.com/d/optout. >>> >> >> >> >> -- >> Robert Sandell >> *Software Engineer* >> *CloudBees Inc.* >> > -- > 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/6831ae03-c232-471a-81c7-a9f2cef2109a%40googlegroups.com > <https://groups.google.com/d/msgid/jenkinsci-dev/6831ae03-c232-471a-81c7-a9f2cef2109a%40googlegroups.com?utm_medium=email&utm_source=footer> > . > > For more options, visit https://groups.google.com/d/optout. > -- Robert Sandell *Software Engineer* *CloudBees Inc.* -- 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/CALzHZS0JtUR6jzS1Up4j2ArkmSJMycRcPLfCzbK5ZvRwyKgxSA%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
