Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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
share|improve this question
    
ssh-add -L lists the public key for any private keys that are loaded; showing the actual private key would probably be insecure. – Ignacio Vazquez-Abrams Feb 14 '11 at 12:32

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

share|improve this answer
    
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 '11 at 13:14
    
@djeikyb: fyi, it's not ssh_agent but ssh-agent. – grawity Feb 14 '11 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 '11 at 18:12
up vote 0 down vote accepted

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.

share|improve this answer

You must log in to answer this question.

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