Information Security Stack Exchange is a question and answer site for information security professionals. 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 am using and authorized_hosts file to authorise certain keys. One of those is restricted with the prefix from="", the others are valid from anywhere.

When accessing from a machine that has an SSH key, but whose key is not in authorized_keys at all, and therefore logging on with a password, this message is generated in syslog.

What is disconcerting is that it says "with correct key". How is it a correct key if the key is not in authorized_keys?

Does it just mean "host offered an SSH key but I didn't recognise it and asked them to sign in with password"?

(I'm using ssh on Debian squeeze)

share|improve this question
Could you post your sshd conf ? ---------- – Yannovitch May 21 '13 at 12:15
This is not an answer! Pls. use comments for this sort of request. No, I don't want to post my entire sshd_conf file, but which bits are you interested in? – artfulrobot May 21 '13 at 12:32
This does not provide an answer to the question. To critique or request clarification from an author, leave a comment below their post - you can always comment on your own posts, and once you have sufficient reputation you will be able to comment on any post. – NULLZ May 21 '13 at 12:53
I think you're in the wrong place. This is not a general and widely-applicable question. It's a bug in your config, or a bug in the SSH daemon. Post your sshd_config and authorized_keys files (censored as necessary) to the OpenSSH (assuming that's what you're using) mailing list, and ask for help there. – ruief May 22 '13 at 11:39
up vote 1 down vote accepted

Some more details would be great to go along with this question...

But in the meantime are you aware of the ability to turn off password authentication in ssh? If you want to make sure the only access to your machine comes from a proper and mutually agreed on ssh key configuration just set the following flags in your sshd_config

 ChallengeResponseAuthentication no
 PasswordAuthentication no
 UserPAM no
 PubkeyAuthentication yes

Then restart the ssh service.

As for the message in the log... have you seen this?

Granted it's not exactly the same as you've described as you note the key isn't in authorized keys at all. Though might be safe to assume the error message is just poorly worded or is being applied too broadly.

Good luck!

share|improve this answer
I don't want to turn off passwords, I just wanted to connect with a password without a warning being generated (as well as being able to log in with keys from other fixed machines). Anyway, thanks, it looks like it's probably that bug. I'll see if it remains when I upgrade squeeze→wheezy – artfulrobot Jun 3 '13 at 12:54

Your Answer


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.