ssh-keygen -t <rsa/dsa as per your choice> -f <new private key file like ~/.ssh/id_dsa.github> -C "comment"
This created a new key pair for me. Now, I had to configure ssh to use this key for github. So, I added the following lines to
Now, I had to add this new key to my ssh keys on Github. I opened the new public key file (
id_dsa.github.pubin the above case) and copied its contents to add a new key on Github. I tried
ssh -vT firstname.lastname@example.org verified that it was using the new key and I was able to access Github successfully.
OpenSSH_5.9p1, OpenSSL 1.0.0g 18 Jan 2012
debug1: Reading configuration data /home/me/.ssh/config
debug1: /home/me/.ssh/config line 9: Applying options for github.com
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Connecting to github.com [188.8.131.52] port 22.
debug1: Connection established.
debug1: identity file /home/me/.ssh/id_dsa.github type 1
debug1: identity file /home/me/.ssh/id_dsa.github-cert type -1