Recently I noticed an easier way to login to bitbucket via SSH. Here is how to go about it. I use a Linux environment so the post is in accordance with that.
Open a terminal and type -
This will create a private and public rsa key on your system. Just keep pressing enter to whatever question it throws you and in the end you will be able to see two files id_rsa and id_rsa.pub. The .pub means it's your public SSH key. This can be distributed. The other one you guard it with your life.
Now open bitbucket and go to Settings -> Security -> SSH Keys. Click on Add Key and give a title - (I usually give my machine's name) and paste your id_rsa.pub contents into the key textbox and Save.
Use this to open the public key file
Go to your repository source tab on bitbucket and click on Clone and select the SSH option. Copy the part that starts with email@example.com ...
Once done go to your code and open .git/config. You will be able to find a property -
url=<substiture the copied url here>
You should be done. Try git pull, push or any other fancy commands you feel like and enjoy.