Friday, February 27, 2015

How to generate SSH keys for Github in Ubuntu

SSH keys are a way to identify trusted computers, without involving passwords. 

To get the previously generated ssh keys, we can use:


ls -al ~/.ssh

To generate the new SSH keys we can use the below command in the terminal with the corresponding email id:


ssh-keygen -t rsa -C "paul.pronabananda@gmail.com"

It will prompt the filename where to save the key. We can forward with the default file. After that we need to provide the password, and confirm password for this key. The key will be generated. Now its the time of add the key with key-agent.

eval "$(ssh-agent -s)"
ssh-add ~/.ssh/id_rsa

Now its the time to make link between my pc and the github application. For this purpose, i will copy the content of the public key and save it in the ssh tab of the personal setting after loggin in to the gitub account. After completion, we need to test the connectivity through ssh.


ssh -T git@github.com

After providing password while prompted, it will give the message as:

Hi ! You've successfully authenticated, but GitHub does not provide shell access.

For details

No comments: