Bamboo SSH Task

Ashish Panwar April 11, 2019

Hi All,

We have a situation in our Bamboo plan , where we need to do ssh to two different Linux machine based on release branch ( build for older code happens on lets say BuildMachine1 and for new code happens on BuildMachine1 ).

Bamboo Server connect via ssh to build server in order to execute this.

 

Now for 2 different release we need to connect to 2 different machine ,keeping the jobs/tasks same.

In SSH task, we can over ride SERVER_HOSTNAME , but its not possible to provide password on run time.So in this case somebody has to update all the ssh tasks manually to run build for 2 different branches. 

Not at all a good option !!

Can you please help in case we can achieve this in some other way.

1 comment

Rafael Pinto Sperafico
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 11, 2019

Hi @Ashish Panwar ,

Perhaps you should consider using "authorized_keys". Here is an example - https://support.hostway.com/hc/en-us/articles/115001569710-Linux-Server-Access-Using-SSH-Key-without-Password

Kind regards,
Rafael

Ashish Panwar April 11, 2019

Hi Rafael,

 

Thanks for the input but Server on which bamboo is hosted is not in our control so only way to access build server to do the build is to use Out of box Bamboo functionality of ssh task .

Now comes the situation where two different build server needs to be accessed via ssh based on which version of build we want to do.

 

Is there anyway we can achieve from Bamboo ? Seems like a real world scenario . 

 

Regards,

Ashish Panwar

Rafael Pinto Sperafico
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 11, 2019

Hi @Ashish Panwar ,

You will have to generate a SSH Key pair (private and public key) and copy the SSH public key to the remote server (server where you are SSH into) placing it under authorized_keys.

Alternatively, you can make use of SSH keys without passphrase.

Kind regards,
Rafael

Comment

Log in or Sign up to comment
TAGS
AUG Leaders

Atlassian Community Events