[CentOS] CentOS 6.5 fresh install, public ssh keys cannot authenticate

Fri May 9 22:44:22 UTC 2014
Digimer <lists at alteeve.ca>

On 09/05/14 06:42 PM, Greg Bailey wrote:
> On 05/09/2014 03:34 PM, Dan Bikle wrote:
>> Dear List,
>>
>> I cannot get public ssh keys to work in a fresh install of centos6.5
> [snip]
>> Steps to reproduce this bug:
>
> [snip]
>
>> do this:
>>
>> cat ~dan/.ssh/id_rsa.pub > ~dan/.ssh/authorized_keys
>
> I think you're missing:
>
> chmod 600 ~dan/.ssh/authorized_keys
>
> Without it, sshd won't use the authorized_keys file if it's readable by
> other users.  (I think that's related to "StrictMode"; consult sshd man
> page)
>
> -Greg

Check the selinux context as well (or, to test, setenforce 0 -> try 
again. Worked? selinux problem, fix the context).

https://alteeve.ca/w/AN!Cluster_Tutorial_2#SELinux_Related_Problems

-- 
Digimer
Papers and Projects: https://alteeve.ca/w/
What if the cure for cancer is trapped in the mind of a person without 
access to education?