Search code examples
sshgerrithardlink

gerrit ssh login issue


I am having an issue with my ssh login to gerrit. When I use one key file it works, but with the other it does not.

ssh gerrit_admin@<host> -p 29418 -i ~/.ssh/project/prod_rsa
****    Welcome to Gerrit Code Review    ****
.....
ssh gerrit_admin@<host> -p 29418 -i ~/.ssh/id_rsa
Permission denied (publickey).

Now the issue seems obvious that one key is on the server and one is not. However both of these key files are identical. Not just copies, but a hard link meaning they both point to the exact same blocks on disk.

ls -il ~/.ssh/id_rsa ~/.ssh/project/prod_rsa 
7603695 -rw------- 2 nellis nellis 1693 Jun 23 13:22 /home/nellis/.ssh/id_rsa
7603695 -rw------- 2 nellis nellis 1693 Jun 23 13:22 /home/nellis/.ssh/project/prod_rsa

Why do these "two" keys which are very much the same produce different reseults?


Solution

  • Not sure exactly what the problem here was, but I ended up just ditching the keys and importing new ones via the web interface.