To use
SSH with Bitbucket, you create an SSH identity. An identity
consists of a private and a public key which together are a key
pair. The private key resides on your local computer and the public
you upload to your Bitbucket account. Once you upload a public key
to your account, you can use SSH to connect with repositories you
own and repositories owned by others, provided those other owners
give your account permissions. By setting up SSH between your local
system and the Bitbucket server, your system uses the key pair to
automate authentication; you won't need to enter your password each
time you interact with your Bitbucket repository.
There are a few important concepts you need when working with
SSH identities and Bitbucket
- You cannot reuse an identity's public key across accounts. If
you have multiple Bitbucket accounts, you must create multiple
identities and upload their corresponding public keys to each
individual account.
- You can associate multiple identities with a Bitbucket
account. You would create multiple identities for the same account
if, for example, you access a repository from a work computer and a
home computer. You might create multiple identities if you wanted
to execute DVCS actions on a repository with a script - the script
would use a public key with an empty passphrase allowing it to run
without human intervention.
- RSA (R. Rivest, A. Shamir, L.
Adleman are the originators) and digital signature
algorithm (DSA) are key encryption algorithms. Bitbucket supports
both types of algorithms. You should create identities using
whichever encryption method is most comfortable and available to
you.