How to Setup Public/Private SSH keys in Github.
- theblackthreat
- Oct 20, 2021
- 1 min read
Follow these 5 steps:
Step 1
Open console
Step 2
Enter the following command on the console.
cd ~
Step 3
ssh-keygen -t rsa
(when prompted, enter a password, the key name can stay the same)
Step 4
/home/your_username/.ssh/id_rsa.pub
Open with your favorite text editor, and copy contents to your Git repository’s keys field (GitHub, beanstalk, or any other repository provider), under your account.
Step 5
Be sure that you don’t copy any whitespace while copying public key’s content (id_rsa.pub)
Additional info
When you create private/public SSH keys on your machine (that’s what you did in the above steps), it’s not enough. You need to give your public key to the repository in order to pair the Git server with your local machine (that’d be steps 4. and 5. above).
Most of the popular repositories will give you web interface access to the application, and here’s how it looks like on Github:

Comments