11

How come this happens?:

stan@tcpc:~/.ssh$ ssh-add -l
8192 e0:45:5e:cc:45:3e:17:2b:a6:54:6f:8d:53:1b:j2:e3 github (RSA)
2048 25:41:53:a6:45:5d:ac:eb:5c:45:f8:ce:42:a9:he:aa BITBUCKET (RSA)
stan@tcpc:~/.ssh$ ssh-add -D
All identities removed.
stan@tcpc:~/.ssh$ ssh-add -l
8192 e0:45:5e:cc:45:3e:17:2b:a6:54:6f:8d:53:1b:j2:e3 github (RSA)
2048 25:41:53:a6:45:5d:ac:eb:5c:45:f8:ce:42:a9:he:aa BITBUCKET (RSA)

How come keys aren't being erased?

p.s. could be this bug? http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=472477 I'm on arch linux though...

  • That bug is years old; on an up-to-date Arch box, it works as expected: openssh 6.2p1-1 – jasonwryan Apr 16 '13 at 18:16
  • jsonwryan... it's actual not years old. Last comment dated 05 Oct 2012 - mentions that it still wasn't fixed. Other comments suggest that the problem is upstream. And no - it doesn't work for me on up-to-date Arch system. However - when I move ssh keys from ~/.ssh directory into ~/.ssh/my_keys (as suggested in bug report) -> addition and removal does work as expected. – agent_smith Apr 16 '13 at 18:25
  • 3
    Read the report carefully: "Fixed in version 3.2.2-2" - pacman -Ss gnome-keyring: 3.6.3-1 – jasonwryan Apr 16 '13 at 18:32
2

The steps in this post worked for me; you just need to open the Startup Applications manager, uncheck the entry for "SSH Key Agent - GNOME Keyring: SSH Agent", and restart Unity. If it doesn't show up, edit /etc/xdg/autostart/gnome-keyring-ssh.desktop and change NoDisplay=true to NoDisplay=false.

  • the link to "this post" is dead – Carson Ip Aug 23 '18 at 4:12
1

Go to /tmp folder, delete all folder starts with ssh

solomon@debian:/tmp$ rm -rf ssh

solomon@debian:/tmp$ ssh-add -D

All identities removed.

solomon@debian:/tmp$ ssh-add -l
The agent has no identities.
  • Don't know why this was down voted. It put me in the right track, although I wouldn't remove ssh folder (!!!!). By just changing folder name and then back to .ssh, gnome keyring stopped listing ssh key. That allowed me to do ssh-add and it all was working as it should – cortopy May 15 '16 at 16:36
0

I had the same problem as you did. I'm not an expert, but the solution that worked for me was to remove the keys from the ~/.ssh directory. This is an example of what I was seeing.

$ ssh-add -l
2048 06:e9:a6:14:2a:e4:c3:11:56:ea:c3:5d:f9:84:79:c6 first key (RSA)
2048 2c:c3:97:fe:f3:cf:03:dc:d3:0b:87:2b:01:72:33:3b second key (RSA)
$ ssh-add -d ~/.ssh/id_rsa.pub
Identity removed: /home/user/.ssh/ybot_rsa.pub (/home/user/.ssh/id_rsa.pub)
$ ssh-add -l
2048 06:e9:a6:14:2a:e4:c3:11:56:ea:c3:5d:f9:84:79:c6 first key (RSA)
2048 2c:c3:97:fe:f3:cf:03:dc:d3:0b:87:2b:01:72:33:3b second key (RSA)

It was after moving id_rsa (and id_rsa.pub) from the ~/.ssh folder that the ssh-agent stopped having the identity. What I did was:

$ ssh-add -l
2048 06:e9:a6:14:2a:e4:c3:11:56:ea:c3:5d:f9:84:79:c6 first key (RSA)
2048 2c:c3:97:fe:f3:cf:03:dc:d3:0b:87:2b:01:72:33:3b second key (RSA)
$ mv ~/.ssh/id_rsa ~/.ssh/id_rsa.pub ~/
$ ssh-add -l
2048 2c:c3:97:fe:f3:cf:03:dc:d3:0b:87:2b:01:72:33:3b second key (RSA)

I'm guessing (I could be wrong) that if you didn't have the Gnome Keyring daemon running (gnome-keyring-daemon), this behaviour would change. Maybe the original (and logical) solution would work, but not the second one.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.