Can't allow users to log in via SSH (Bash, OpenSSH, CentOS 6.5)

As @toppledwagon suggests in the comments to my question, I checked /var/log/security and sure enough there was an entry for bad permissions on the ~/.ssh/authorized_keys tree including the home directory.

After making these edits I was able to log in to the user's account via ssh with RSA keys:

$ chmod g-w /home/your_user
$ chmod 700 /home/your_user/.ssh
$ chmod 600 /home/your_user/.ssh/authorized_keys

Ref: http://www.daveperrett.com/articles/2010/09/14/ssh-authentication-refused/

After adjusting these permissions I was able to log in. It was interesting to note that I had the .ssh dir and authorized_keys file already set to 700 and 600 respectively. For some reason the home directory was not set properly.

Thanks to all who helped in the comments.


  1. In /etc/ssh/sshd_config add the group of your user to AllowGroups.
  2. Restart sshd service sshd restart