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
```
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.