shonky linux user
shonky linux user

Reputation: 6428

Bamboo Deploy via Bastion Host

How can I configure a Bamboo Deployment Task to use a SSH Bastion (jump) host to connect to the target deployment server to run a script?

I've tried configuring a .ssh/config file on the bamboo server. It works from the command line but it is ignored by Bamboo.

Upvotes: 5

Views: 1313

Answers (2)

tvlooy
tvlooy

Reputation: 1036

I think this can be worked around by defining the host in your .ssh/config and using -J option there. In Bamboo use the alias that is defined in .ssh/config. Behind the scenes it's just SSH commands and will probably pick up the alias

I did not test this.

Upvotes: 0

IBam
IBam

Reputation: 11774

Bamboo doesn't support this - although it doesn't explicitly say so in the docs. It appears you're not the only one trying to do this. You have a couple of alternatives:

  1. Avoid the Bamboo SSH task, create a Command task that does what you want, i.e. calls the system install of ssh.
  2. Use a Command task to call the system install of ssh and forward a port via the bastion to the target, then use a Bamboo SSH task through that tunnel.
  3. Externally (i.e. not within Bamboo) maintain a tunnel that you can use for your Bamboo SSH task.
  4. Use a tool that supports ssh a bit better, such as Jenkins.

Hope that gives you some ideas!

Upvotes: 2

Related Questions