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

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

SSH Keygen, invalidates existing SSH keys ?

The documentation tells me to run this from terminal but if I do, doesn't this invalidate the other ssh keys I've already got for AWS, GIThub and others.

How should I modify the RSA file or add a new one as I'm doing this SSH keygen on my own over the weekend and not sure how to proceed without wiping out all my existing keys.

```

ssh-keygen

```

1 answer

0 votes

Hello @Andrew,

Thanks for reaching out and welcome to the Community!

Nothing stops you from using the SSH key you already have. However, it is generally recommended to create separate SSH key pairs for each of the services you're using: in case a private key is compromised, only one service would be possibly affected and hence require SSH key roll over.

If you already have .ssh/id_rsa key file, running ssh-keygen just like that will indeed overwrite that key (it will ask before overwriting it though). However, id_rsa is just the default name for RSA key type. You can have as many keys as you want with any names you want. You can specify the output file name by adding -f option. You can also specify the type and length of the key if you want. Bitbucket supports four encryption algorithms for user keys: Ed25519, ECDSA, RSA, and DSA.

Here's an example of how to create a 256bit ECDSA key and store it in a file ~/.ssh/bitbucket_cloud (public key will be in a file with same name and .pub extension added).

ssh-keygen -t ecdsa -b 256 -f ~/.ssh/bitbucket_cloud

You should then specify this key when you access Bitbucket or add it to the SSH agent beforehand.

Hope this helps. Let me know if you have any questions.

Cheers,
Daniil

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Bitbucket

Calling any interview participants for Bitbucket Data Center

Hi everyone,  We are looking to learn more about development teams’ workflows and pain points, especially around DevOps, integrations, administration, scale, security, and the related challeng...

464 views 4 4
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you