Bamboo SSH task SSH key file format

I have tried puttygen to format a private key for Bamboo SSH task , as well as the id_rsa file that is generated from the ssh-keygen -t RSA command. Both failed?
My process is as followed:

On my App server run as bamboo user:

ssh-keygen -t RSA

...(NO Password)

id_rsa.pub >> .ssh/authorizedkeys

change the permissions on the files and folders.. DONE.

Download the private key id_rsa to local machine: Puttygen to .ppk format and/or use the id_rsa file to upload to bamboo KEY for SSH task..

This process causes Authorization Failure.

Is there a specific format the key needs to be or am i doing the process wrong?
I do not have dedicated bamboo elastic instance, i just use the linux s3 64 bit one they offer to build and deploy to my server..
Any and all insight is appreciated.

Thank you for your diligence.

3 answers

1 accepted

Accepted Answer
0 votes

Normally you would run ssh-keygen on the machine running Bamboo as the private key 'belongs' to the Bamboo machine not the remote machine. But you can get it working either way.

On the remote machine you need to add the generated id_rsa.pub file to the ~/.ssh/authorized_keys file of the account you want to connect under (In your original comment you have the file called authorizedkeys). Note: IIRC both the .ssh directory and the authorized_keys file must NOT be group nor world readable.

If you need to specify a password or not when uploading the id_rsa file to Bamboo depends on if the id_rsa file was created with password encryption or not.

If you are not sure if your id_rsa file is encrypted open the file in a text editor. If it begins with

-----BEGIN RSA PRIVATE KEY-----

Proc-Type: 4,ENCRYPTED

DEK-Info: DES-EDE3-CBC,7D86EF6581EFD29E

then it is encrypted. If it just starts with

-----BEGIN RSA PRIVATE KEY-----

then it is not encrypted.

bamboo on demand

version 5.2-OD-3

build#: 4000

builddate: 10/22/2013

The id_rsa file as generated by ssh-keygen works for me (that's for a local install of Bamboo not OnDemand though).

Can you give me a high level of your process?
Your on remote host, ssh-keygen.. take the id_rsa upload it to bamboo server for ssh task or scp task and it works? when you run build it successfully connects to remote host from bamboo server? with or without password?

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Monday in Jira Ops

Jira Ops Early Access Program Update #1: Announcing our next feature and a new integration

Thanks for signing up for Jira Ops! I’m Matt Ryall, leader for the Jira Ops product team at Atlassian. Since this is a brand new product, we’ll be delivering improvements quickly and sharing updates...

461 views 0 9
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