How to replace or regenerate the elasticbamboo.pk used for Elastic Bamboo

Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.

Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

Summary

Elastic Bamboo stores an SSH private key at <bamboo-home>/shared/configuration/elasticbamboo.pk

The purpose of this key is to:

  1. To allow administrators to SSH into running Bamboo Elastic agents.

  2. Within the application; it is used to decrypt the RDP Password for Windows instances and display it in the UI for remote access purposes.

Bamboo can operate Elastic Bamboo functionality fine without this key but remotely accessing the agents outside of Bamboo will be impossible.

The purpose of this knowledge-base article is to show you how to regenerate it if it becomes mismatched at some point or replace it entirely if you want to change the SSH key that Elastic Bamboo utilizes.

Solution

  1. Remove any existing elasticbamboo.pk file from the filesystem on the Bamboo Server at: <bamboo-home>/shared/configuration/elasticbamboo.pk

  2. Log in to the AWS EC2 Console.

  3. Change the Region in the AWS console to the Region that your Elastic Bamboo is configured to launch agents into. E.g. Asia Pacific (Sydney).

  4. Visit Keypairs in the AWS EC2 console.

  5. Delete any existing keypair called elasticbamboo from AWS EC2 Keypairs.

  6. Follow either Method 1 or Method 2 depending on your requirements:

Method 1: Have Bamboo regenerate a new private key

The next time Bamboo starts an Elastic Agent, the keypair will be regenerated and saved at <bamboo-home>/shared/configuration/elasticbamboo.pk. You could force this by manually starting an agent at Bamboo Administration >> Elastic Instances >> Start new elastic instances.

Method 2: Generate or import your own via the AWS EC2 Console

  1. In the same EC2 Keypairs UI in the AWS Console, either:

    1. Create keypair with name elasticbamboo. The keypair will be automatically downloaded to your local filesystem via the browser.

      It needs to be named elasticbamboo.pk but AWS will create it with a .pem extension. Make sure to rename the extension during the copy in Step 2.

    2. Import keypair with name elasticbamboo and upload your exsting SSH key.

  2. Copy the keypair that was either downloaded or imported to the Bamboo Server filesystem at: <bamboo-home>/shared/configuration/elasticbamboo.pk

Updated on April 2, 2025

Still need help?

The Atlassian Community is here for you.