Unable to SSH to elastic agent launched by Bamboo


I am in the process of configuring bamboo to perform nightly builds and tests for my project. In order to install and run my project I require some specialized software packages to be installed. Because of this, I am building a custom AMI based on the Atlassian Ubuntu 14.04 Elastic Bamboo micro instance.

In order to configure the base Ubuntu 14.04 instance with my required software, I launch the instance from the bamboo instances configuration page and attempt to connect using SSH to install my software packages.

When I start the instance from bamboo, I am given a private key (elasticbamboo.pk) to download which I assume corresponds to the keypair elasticbamboo in my AWS management console. I also see that the instance is created in the aws management console instances page and that I can view additional information about the instance there.

I use the command:

ssh i elasticbamboo.pk ec2user@publicDNS

to connect to the instance and I get a prompt that the authenticity of the host can't be established the key fingerprint is x and asks if I want to continue. I select yes and the host is added to the list of known hosts and the connection is attempted. The connection fails with the message: permission denied (public key).
I have noted that the fingerprint given in the terminal when connecting does not match the elasticbamboo keypair fingerprint in the aws console.

I have also attempted using puttygen to convert the pk file to a ppk file and using putty to connect via SSH in windows, but this has the same problem.

What steps am I missing to connect to my instance?
Thanks for your help. 

1 answer

0 votes

It looks like elasticbamboo.pk key available on your instance doesn't match the keypair created on the server. You might try fixing the issue by removing the keypair on the server. If your Bamboo instance is hosted locally you should also remove the key from the local storage on the Bamboo server.

Then just simply run another EC2 agent and Bamboo will recreate security group and download the private key. 

I tried removing the keypair and security groups from the aws console and having bamboo re-generate them but I am still unable to ssh to any instance launched by bamboo.

Suggest an answer

Log in or Join to answer
Community showcase
Renan Battaglin
Published May 18, 2017 in Bamboo

FAQ: How to Upgrade Bamboo Server

Bamboo 5.9 will no longer be supported after June 12, 2017. What does this mean? As part of our End of Life policy, Atlassian supports major versions for two years after the first major iteratio...

1,068 views 0 5
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot