vishavjeet

singh.vishavjeet11@gmail.com

How to create and enable SSH Keys for github

Posted on June 30, 2021



Step1: Creating the Key Pair on OSX and Linux

>ssh-keygen -o -b 4096

>Enter file in which to save the key (/root/.ssh/id_rsa): press enter key

>Enter passphrase (empty for no passphrase): press enter key

>Enter same passphrase again: press enter key

output on CMD

Your identification has been saved in /root/.ssh/id_rsa

Your public key has been saved in /root/.ssh/id_rsa.pub

The key fingerprint is:

SHA256:nmBGy87NsXz49LtLSJc73Mxg8xwEx4QsPZ+OOfOu9u8 root@vishavjeet-Python

......

Step3: Display the public key content with the cat command and copy it :

> cat /root/.ssh/id_rsa.pub

ssh-rsa AAAAB3NzaC1yc2...........KvAszrTVoGK8rgLgC/iw== root@vishavjeet-Python

Step4: Save the Content of the Public Key on the SSH Keys Section on BitBucket

url link: https://github.com/settings/keys

Add New SSH Key

Step5: set remote:

>git remote set-url origin git@github.com:vishavjeet/reponame.git


For More Details


Sign In for comment and like the post.