SSH Key Setup for Bitbucket

Follow these steps to generate and add SSH keys for Bitbucket:

Generate SSH Public and Private Keys

Step 1 - Open Command Prompt

Step 2 – Type ssh-keygen and press Enter

Step 3 – Go to folder C:\Users\user\.ssh

Private key file – id_rsa
Public key file – id_rsa.pub

Add Private Key

Step 1 – Open id_rsa file in Notepad

Step 2 – Copy file content and paste in Command Prompt below command and execute

Add Public Key

Step 1 – Open id_rsa.pub file in Notepad

Step 2 – Go to Bitbucket → Personal Settings → SSH Keys → Click on Add Key

Step 3 – Copy file content and add to Bitbucket key and click save. (Do not enter anything in label)

Verify key is added successfully.

Add config and known host files to .ssh folder

Below steps are optional if you need to add config and known host files.

Step 1 – Copy and paste config and known host file to .ssh folder
Step 2 – Copy public key file content and paste to known host file
Step 3 – Open config file and edit your name and email details as per Bitbucket profile