added wrong ssh key in local machine for github how to correct on localmachine

Viewed 103

I am trying to setup my github account. I followed this tutorial https://linuxtechlab.com/how-to-install-github-on-ubuntu-step-by-step/ I have generated github account keys in a folder called /home/debian/git_keys the keys are following kiotie32_rsa kiotie32_rsa.pub now while doing ssh-add I did a mistake I did

debian@osboxes:~/git_keys$ ssh-add 
Identity added: /home/debian/.ssh/id_rsa (debian@osboxes)

it added id_rsa on my local machine. That is my understanding. Which is not correct . What should I do in this situation to add the keys I generated in /home/debian/git_keys and remove the key which was previously added.

1 Answers

In addition of ssh-add (if you have protected your jey with a passphrase), you will need a /home/debian/.ssh/config file in order to reference that ssh key (which has a non-standard name)

As illustrated here, that will change your SSH URL.

Related