agent.jar
program on the correct
machine.
A copy of agent.jar
can be downloaded from here.
In a simple case, this could be
something like ssh hostname java -jar ~/bin/agent.jar
.
Note: the command can't rely on a shell to parse things, e.g. echo foo > bar; baz
.
If you need to do that, either use
sh -c
or write the expression into a script and point to the script.
It is often a good idea to write a small shell script, like the following, on an agent so that you can control the location of Java and/or agent.jar, as well as set up any environment variables specific to this node, such as PATH.
#!/bin/sh exec java -jar ~/bin/agent.jar
You can use any command to run a process on the agent machine, such as RSH,
as long as stdin/stdout of the process on the controller will be connected to
those of java -jar ~/bin/agent.jar
on the agent machine eventually.
In a larger deployment, it is also worth considering to load agent.jar
from
a NFS-mounted common location, so that you don't have to update this file
on every agent machines every time you update Jenkins.
Setting this to ssh -v hostname
may be useful for debugging connectivity
issue.