Configure Jenkins slave through ssh gateway

2,680 views
Skip to first unread message

Gergo

unread,
Oct 16, 2012, 1:50:29 PM10/16/12
to Jenkins Users
Hi,

I'm new to Jenkins and have the following problem. What do you think
is the best way to configure in a Jenkins slave which is behind a
gateway? To reach my test environment I need to go through a gateway.
It would be great to somehow configure in the RemoteMachine (which is
located behind the gateway) as a slave. Can I somehow configure in an
ssh tunnel in Jenkins which could be used to reach the RemoteMachine?

Example
LocalMachine (Jenkins CI Server) <---(ssh)---> Gateway <---(ssh)--->
RemoteMachine (TestServer)

Thanks for the help!
Gergo

Andrew Melo

unread,
Oct 16, 2012, 1:52:17 PM10/16/12
to jenkins...@googlegroups.com
My jenkins machine is behind a firewall, and I use the -D option of
ssh to set up a socks5 proxy I can point firefox to to get connected
to jenkins

HTH,
Andrew

>
> Thanks for the help!
> Gergo



--
--
Andrew Melo

Bryan Hunt

unread,
Oct 16, 2012, 2:01:38 PM10/16/12
to jenkins...@googlegroups.com
Click the advanced button in the slave node configuration. There is a tunnel configuration option for you.

Gergo

unread,
Oct 28, 2012, 12:36:52 PM10/28/12
to Jenkins Users
Hi,

Thanks for the quick answers.
I found the "Tunnel connection through" configuration parameter in the
"Launch method -> Launch slave agents via Java Web Start". I really
wanted something similar but in the "Launch method -> Launch slave
agents on Unix machines via SSH". I came across these parameters:
"Prefix Start Slave Command", "Suffix Start Slave Command". Sadly I
had a really old version of Jenkins which was missing these very cool
options. With these I could execute an ssh command just before the
slave started.

Thanks,
Gergo

Gábor Garami

unread,
Nov 1, 2012, 10:02:54 AM11/1/12
to jenkins...@googlegroups.com

I dunno if it can or can't work, but give a try for $HOME/.ssh/config and ProxyCommand on master.

Garami Gábor
gabor....@hron.me
Skype: hron84
Tel: +36 20 235 9621

Sent from my T-Mobile G2
Ezt a levelet telefonról adták fel, ékezethibákat tartalmazhat.

Reply all
Reply to author
Forward
0 new messages