5

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.

shonky linux user
  • 6,131
  • 4
  • 46
  • 73

2 Answers2

2

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!

IBam
  • 10,114
  • 1
  • 24
  • 36
0

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.

tvlooy
  • 1,036
  • 10
  • 16