Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Not seeing how to use an existing SSH public key on a new server

Dave Sky
Contributor
July 25, 2018

Maybe I don't know enough about ssh keys, but I'm trying to get a Linux server to work with an existing Bitbucket "public" key.

I was able to create my own key on my Mac and add it to the Bitbucket repo, but I discovered the repo already has a key that was used for... something... but I'm not sure how to get that key to our test box.

Do I just copy the key and replace id_rsa.pub with it? I'll be going through ssh-keygen on Linux, but I don't know if that will break the chain or something.

1 answer

1 accepted

0 votes
Answer accepted
Ana Retamal
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 26, 2018

Hi Dave! An SSH key consists of 2 parts: a public key and a private key. When you use it, you need to keep the private key in your machine and share the public one with the other services, in this case Bitbucket Cloud. 

If that repo had already an SSH key on it but you don't own the private part, it will be completely useless. You can not just copy it and replace the one you created, because the pair will not match. There are many resources to better understand how SSH keys work, for example this one.

My recommendation is that you use the SSH key you recently generated and follow the instructions at Set up an SSH Key.

Let us know if you have any questions!

Best regards,

Ana

Dave Sky
Contributor
July 26, 2018

OK thanks.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events