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

Fri May 9 22:42:52 UTC 2014
Greg Bailey <gbailey at lxpro.com>

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


>
> try:
>
> ssh dan at localhost
>
> It should log me in.
>
> Instead it prompts for password.
>
> I've walked through this type of scenario many times over the past few
> years and it has always worked.
>
> Currently it works well on ubuntu 12.04.
>
> I think something in centos6 might be broken?
>
> Perhaps there is a documented step somewhere which has been added to
> fresh centos installs which I missed?
>
> Dan
> _______________________________________________
> CentOS mailing list
> CentOS at centos.org
> http://lists.centos.org/mailman/listinfo/centos