Generate ID for bitbucket
ssh-keygen
By default, this is stored at ~/.ssh/id_rsa. Change this to ~/.ssh/bitbucket_id_rsa
Now configure ssh to use your bitbucket id when talking to bitbucket.org. Following text should go into ~/.ssh/config
. If the file does not exist, create it:
Host bitbucket.org
UseKeychain yes
Add ssh key to the ssh-agent:
eval `ssh-agent`
On Mac:
ssh-add -K ~/.ssh/bitbucket_id_rsa
On Linux:
ssh-add -K ~/.ssh/<bitbucket_id_rsa
Now we need to tell bitbucket your public key so they can verify that it's you:
cat ~/.ssh/bitbucket_id_rsa.pub
Copy the output of the command above and add a new key on bitbucket: (https://bitbucket.org/account), ssh keys.
Now you can even test your configuration:
ssh -T [email protected]
Generate ID for Github
ssh-keygen
By default, this is stored at ~/.ssh/id_rsa. Change this to ~/.ssh/github_id_rsa
Now configure ssh to use your github id when talking to github.com. Following text should go into ~/.ssh/config
. If the file does not exist, create it:
Host github.com
UseKeychain yes
Add ssh key to the ssh-agent:
eval `ssh-agent`
On Mac:
ssh-add -K ~/.ssh/github_id_rsa
On Linux:
ssh-add -K ~/.ssh/<github_id_rsa
Now we need to tell github your public key so they can verify that it's you:
cat ~/.ssh/github_id_rsa.pub
Copy the output of the command above and add a new key on github: (https://github.com/settings/profile), Security, SSH and GPG Keys, SSH Keys.
Now you can even test your configuration:
ssh -T [email protected]