0

I was testing my authorized_hosts setup, so deleted my local private key. I then successfully ssh'd into my remote server using RSA authentication.

I was expecting to get a permission denied, seeing as there is no longer a private key to guarantee I'm me. Guessing I'm misunderstanding something fundamental. Anyone know what's going on?

It doesn't look like ssh-add is holding my private key:

jake@clyde:~$ sudo pkill -9 ssh-agent
1
  • ssh-add -L lists the public key for any private keys that are loaded; showing the actual private key would probably be insecure. Feb 14, 2011 at 12:32

2 Answers 2

2

Your private key may have been loaded into the SSH agent running on your machine. Use ssh-add -L to verify.

3
  • Are you saying if I see the public key when running ssh-add -L, then the private key is loaded? I ran ssh-add -D to delete all identities from ssh-add. It had no effect. root:# pkill -9 ssh_agent also had no effect on my ability to remotely login.
    – djeikyb
    Feb 14, 2011 at 13:14
  • @djeikyb: fyi, it's not ssh_agent but ssh-agent. Feb 14, 2011 at 15:33
  • Bugger. No matter. Eris knows why, but I kill nined the pid after each pkill, just to be sure. ps auxw|grep ssh showed only the keyring command by the end, which is how I narrowed it down.
    – djeikyb
    Feb 14, 2011 at 18:12
0

Ignacio's suggestion got me thinking. If ssh-agent might be caching my private key (which was proven to not be the case), what else might be? The culprit, of course, was gnome-keyring-daemon. There may be a more elegant way, but smashing it with a hammer felt good (kill -9). Now attempting RSA authentication without a private key in existence fails as expected.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .