Web and App Development Tutorials

Ubuntu - Setup a SSH Key for Your GitHub Account

Step 01 List SSH Directory

List SSH Directory

List SSH directory. It's not %100 necessary but good to know if you have existing GitHub SSH keys.

Step 02 Go into Your SSH Directory

Go into Your SSH Directory

Go into the ssh directory by running the the cd command also called the change directory command.

Step 03 Use SSH Generator to Generate Key for Your GitHub Account

Use SSH Generator to Generate Key for Your GitHub Account

Generate a SSH key using the Linux ssh-keygen command using your own email attached to you GitHub account.

Step 04 Add RSA File by Following the on Screen Steps

Add RSA File by Following the on Screen Steps

Follow each on-screen step to generate a RSA file. Doesn't have to be named github_rsa but as a suggestion copy the below name for better organization.

Step 05 Make Sure SSH Agent is On

Make Sure SSH Agent is On

Make Sure SSH Agent is On

Step 06 Add Information to SSH

Add Information to SSH

For single sign-on capabilities, make sure to add your new SSH configuration to the ssh-agent helper program to keep track of your identity key and passphrases. This is to make sure you don't have to type a password all the time.

Step 07 Check and Copy SSH Key

Check and Copy SSH Key

There're several ways to copy a SSH key, since everyone doesn't have programs like xcopy installed. This is the most universal (but manual) way to copy your public SSH key to your GitHub account.

Step 08 SSH GitHub Test

SSH GitHub Test

Testing your SSH to make sure your GitHub setup is correct. Even if the reply is "Hi USERNAME! You've successfully authenticated, but GitHub does not provide shell access." means you're all good, and setup correctly.