I have jenkins running on master.com
, and want to have a slave running on slave.com
. However, to ssh to the slave I need to go through gateway.com
. Generally to ssh to this machine from my normal account, I just use ~/.ssh/config to set up a ProxyCommand.
I have replicated this setup in my /var/lib/jenkins/.ssh/config
file:
Host slave.com
User felix
ProxyCommand ssh [email protected] nc %h %p
I have public key authentication set up for both the gateway and the slave, such that from the command line I can ssh directly from [email protected]
to [email protected]
simply by doing ssh slave.com
.
Unfortunately Jenkins does not seem to respect my .ssh/config setup, and the connection times out (the slave is not reachable directly). The Jenkins slave log file is:
java.io.IOException: There was a problem while connecting to slave.com:22
....
Caused by: java.net.ConnectException: Connection timed out
How can I figure out whether or not jenkins is respecting my .ssh/config file? Am I missing a step in configuring the master jenkins account or the .ssh/config file for jenkins?