github.com: generate SSH keys
Blogs20122012-07-08
github.com and SSH keys
github.com access needs SSH keys permission. Here I list the process of generating ssh-key between my Unbuntu desktop and github.com remote server. Quite easy.
In my Unbuntu desktop:
$ cd $HOME
# If ssh-keygen command doesn't exist, you need to apt-get install.
$ ssh-keygen -t rsa
# a new directory .ssh is generated.
cd $HOME/.sshThere are 2 files generated in .ssh directory.
- id_rsa
This is private key file which is kept locally - id-rsa.pub
This is the file need to sync in github.com and locally.
Now copy contents in $HOME/.ssh/id_rsa.pub, and paste it in github: https://github.com/settings/ssh: Title: could be any string
Key: copy the above context to here and save.
After the authenication, now the following works:
$ git remote add origin git@github.com/account_name/repository_name.git
$ git push -u origin master