Q:

CentoOS SSH Access

I'm executed this commands with root user i'm on a CentOS 6.3 server:
#useradd newuser
#passwd newuser

#visudo

then I added this line at end of file:
AllowUsers newuser

#service sshd restart
#exit

Now, I can't access server with deployer or root user!
Both accounts return:
**Permission denied, please try again.**

Any suggestions?
EDIT: Why add AllowUsers newuser dont allows newuser to login by ssh?

A:

AllowUsers, quoting man sshd_config, "If specified, [allows] only user names that match one of the patterns".
To work around the problem, try logging in as newuser, and then use sudo -i (if newuser is allowed to run the command) or su root (if you know the root password) to become root and take the AllowUsers line out. After modifying sshd_config, restart sshd.

