Adding SSH to GitHub Account

Hi all,

GitHub provides a mechanism to add an SSH keys to account . So we dont need to type email id and password each time when we push our code to GitHub.

What we need to do ??

1.check for any SSH key in system.

2. create a new SSH key id not

3. copy the SSH key GitHub Account

4. link SSH key with  our account.

Check for SSH Keys in System:

by using the command

ls -al ~/.ssh

will display the current SSH keys in the system. currently i have created that, that’s why there is keys present.

generate new SSH key:

ssh-keygen -t rsa -b 4096 -C “
ex:ssh-keygen -t rsa -b 4096 -C “

it will create new keys.

just press for prompts. no need to change anything. if you want to give a pass phrase ; type a pass phrase too.

Add a SSH Agent:

by using the command;

eval “$(ssh-agent -s)”


will create the SSH agent.

Add your SSH key to the ssh-agent:

ssh-add ~/.ssh/id_rsa

use your text reader ;now i am using the head so that head <file_location.>


now all the process is done .. now what we need is to add our SSH to the gitHub account. login with GitHub account.

gitHub Account–> profile–>settings–>ssh keys–>add ssh keys–>type your password again..>



Test Connection:

by using the command;

ssh -T

now we dont need to type our username and password again..




Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s