User denied ssh access while in AllowUsers list

If you're absolutely sure that you've restarted the SSH server or told it to reload its configuration file by sending it a SIGHUP…

Maybe the AllowUsers is in a Match section? If there is a previous Match directive, it might cause jonathan, arwen and the others to be only allowed in certain circumstances, as in

…
Match localhost PasswordAuthentication yes

# Whitelist users who may ssh in
AllowGroups admin
AllowUsers jonathan daniel rafael simon thomas li arwen

(The comment is misleading: these AllowGroups and AllowUsers directives only apply when logging in to localhost. The Match localhost directive should be moved below these.)


If you are under Ubuntu, you might face the same issue as I did. There are two service definitions /etc/init.d/ssh and /etc/init/ssh.conf . Restarting service like (old-style)

/etc/init.d/ssh restart

does nothing (and status command shows nothing). Restarting Upstart service directly like

service ssh restart

does the thing. Since OS restart helped in your case, that seems to be an issue.

Also, check that users are space-separated, and not comma-separated. SSH daemon does not show any warnings for that.