SSH and Bitbucket setup/configuration on OSX

SSH and Bitbucket setup/configuration on OSX

In this article I will show you how to create a SSH key (in OSX) and how add this SSH key in BitBucket.

Run the next code in the terminal to generate the SSH keys.


Generate a SSH key

Click on ‘enter’ if you want this location for the key files.

Setting to generate a SSH key

Create a password (and confirm your password) and click on the ‘enter’ key on your keyboard. A public and private key will be created.

Add the SSH key to Bitbucket

We don’t want to type our password every time we do a request to Bitbucket We can do this trough

ssh-add -K ~/.ssh/id_rsa

Type in in the password that you've just created.

Open the SSH config file (or create this if the file not exist yet).

vi ~/.ssh/config

Add this in the file.

Host *
  UseKeychain yes

Add the SSH key to your Bitbucket account

Add SSH Key to Bitbucket

Click on the button ‘Add key’ to create label for your (public) key. Paste the code from your public SSH ( key in the textarea.

You can test if it works by entering the follow command in the terminal

ssh -Tvv

Remote Laravel developer