How to fix – Fingerprint has already been taken

Sometimes we have “Fingerprint has already been taken” while adding our ssh key.

To fix that issue, we need to generate a new ssh key. But the problem is your existing ssh key is added to other resources so if you generate a new one, you have to replace it everywhere.

Instead of doing this, generate a new ssh key in a new file and add it wherever it is needed.

Run the following commands on the terminal to generate the SSH key:

ssh-keygen -t rsa -b 4096 -C "[email protected]"

Then it will ask where to generate:

Generating public/private rsa key pair. 
Enter file in which to save the key (/home/<NAME>/.ssh/id_rsa):

Give the following name for the file

/home/<NAME>/.ssh/id_rsa2

And the last step is to add it to the file by the following command:

ssh-add ~/.ssh/id_rsa2