How to generate 4096 Byte SSH Keys

Amit Sharma October 11, 2023

I want to use Bitbucket SSH Keys to Acquia Cloud. But Acquia Cloud allows only 4096 bit keys and bitbucket doesn't generate 4096 bit keys.

In this situation, I created another key which is 4096 bit and added it to Acquia Cloud.  

Now in the bitbucket pipeline, I need to use a newly generated private key so that CI server can authenticate itself while pushing the code to Acquia Cloud.

I followed https://support.atlassian.com/bitbucket-cloud/docs/use-multiple-ssh-keys-in-your-pipeline/ to implement this.

Using these keys I tried to do SSH in the Acquia cloud server in the pipeline but got the error:

USER@HOST: Permission denied (publickey).

Please suggest

 

1 answer

1 accepted

0 votes
Answer accepted
Patrik S
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
October 12, 2023

Hello @Amit Sharma and thank you for reaching out to Community!

You should be able to use your own keys in Pipeline by selecting the option Use my own keys under Repository Settings > SSH keys page : 

Screenshot 2023-10-12 at 12.11.47 PM.png

By selecting that option, you'll be prompted to provide both the private and public keys you have created locally. Right below on the same page, you can also provide your SSH server host IP address/URL to fetch the fingerprint, so it will be automatically added to the known_hosts file inside the build container.

Once the keys are configured in the settings page, they will be automatically made available inside the build container for subsequent builds, so you won't need to export them as in the article you shared.

Could you try following that route and let us know how it goes?

In case you are still facing issues, we kindly ask you to share the full SSH command you are executing (you can redact private information such as server name/IP/username) and the full log output you are receiving.

Thank you, @Amit Sharma !

Patrik S

Amit Sharma October 12, 2023

Awesome, better approach to handle the same. Thank you very much for all the help @Patrik S 

Like Patrik S likes this
Patrik S
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
October 13, 2023

You're very welcome @Amit Sharma !

Feel free to reach out to Community if you ever need help :)

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
TAGS
AUG Leaders

Atlassian Community Events