This is the guide to follow if you are looking at using SSH keys to connect to bitbucket. SSH keys means you can skip having to type your password each time you want to do a git push.
However, on OSX you'll want to ensure you have Remote Login ticked under System Preference > Sharing.
If you don't, you'll get
$ ssh localhost
$ ssh: connect to host localhost port 22: Connection refused