Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

2 Answers 2

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

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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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