Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I've got PubkeyAuthentication set up on many of the hosts I need to manage, but not all of them. As I use the ssh-agent to store my private key, on servers that know me, this is a passwordless login. However, on servers that don't have my key in authorized_keys, I get prompted for my passphrase (apparently after agent authentication fails). Obviously this will also fail, but requires me to enter that passphrase and my actual login password.

Or I need to configure .ssh/config to enable PubkeyAuthentication only on hosts that I've set up, but that's annoying too, since my keys are deployed to many servers by automation, and I'd rather not also have to manage my .ssh/config this way.

PuTTy does the right thing here and prompts immediately for a password. How can I make OpenSSH do the same when agent authentication fails?

share|improve this question
    
The best I've managed so far is adding to .ssh/config: IdentityFile ~/.ssh/DOES_NOT_EXIST Which causes the desired behaviour, but also generates warnings about the key not being accessible. –  Keenan Jul 22 '13 at 21:37
add comment

Your Answer

 
discard

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

Browse other questions tagged or ask your own question.