CentOS 5.3. I can SSH into the system as root just fine. Added a user and set their password. They have shell access (/bin/bash). I can su to the account from root just fine. I updated /etc/ssh/sshd_config with:

AllowUsers myNewUser

And restarted sshd: /etc/init.d/sshd restart

When trying to ssh into the server with the new user, I get a permission denied. And yes, I've double and triple checked that I am using the correct password. Any help is appreciated.

link|improve this question
If you turn on verbose logging you'll probably be able to tell quite quickly what the problem is. – Kaleb Pederson Jun 5 '10 at 2:15
1  
look at /var/log/secure and /var/log/messages for ways to debug and post that info here – Mike Jun 5 '10 at 4:12
su <newuser> is different from su - <newuser>. Did you try the latter, which starts a login shell? – mpez0 Jul 17 '10 at 14:18
feedback

migrated from stackoverflow.com Jun 5 '10 at 2:31

This question came from our site for professional and enthusiast programmers.

2 Answers

Is the uid >= 500? On RHEL/CentOS, the default PAM config has a check for uid. Another possibility could be the password is expired (if you set it as root using passwd <username>) - does a login rather than su to the user reveal any issues there? Does it work using Pubkey authentication rather than a password?

The reason is probably logged in authlog, and troubleshooting without that log data is really just speculation.

link|improve this answer
feedback

Can you change the Log level in your sshd_config to look like this:

LogLevel DEBUG

Restart SSH. Then try logging in as myNewUser and post the output from /var/log/secure here (after stripping out any specific identifying information!) 1

1: The DEBUG log level can violate User privacy according to the man-page for sshd(5)

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

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