Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Bamboo SSH task SSH key file format

Stephen Goldberg November 8, 2013

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

1 vote
Answer accepted
Manuel Mall November 15, 2013

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.
NaveenKumar November 20, 2018

I am getting an error while following this article.

failed to connect host.

0 votes
Manuel Mall November 8, 2013

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

Stephen Goldberg November 14, 2013

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?

0 votes
Stephen Goldberg November 8, 2013

bamboo on demand

version 5.2-OD-3

build#: 4000

builddate: 10/22/2013

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events