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

Fri May 9 22:34:15 UTC 2014
Dan Bikle <dan at stockbeaver.com>

Dear List,

I cannot get public ssh keys to work in a fresh install of centos6.5

This might be a centos bug.

I've googled for a solution.

Mostly I found threads suggesting I debug sshd or run ssh -v for clues.

Also I've seen threads suggesting I look at file and directory permissions.

I dont think I should need to debug sshd after a fresh install.

Also I think a fresh install should correctly set file and directory
permissions.

I think ssh should just simply work or I should see some simple
documentation to make it work.

Steps to reproduce this bug:

Get the latest copy of virtualbox software.

Get a centos6.5 dvd.

Press the new button in virtualbox

In the settings of the new install ask virtual box to setup a bridged adapter.

Walk through the virtualbox wizard UI.

When it asks for distribution point it at centos6.5 iso

When the iso boots inside of virtualbox,
choose to install desktop which is the first choice of choices.

Eventually it will ask for a username, give the name of 'dan' and
password paloalto9.

When presented a login screen, login as dan.

Start a terminal.

try ssh:

ssh dan at localhost

That should prompt you for password and log you in.

Also it should create ~dan/.ssh/

cd ~dan/.ssh/

do this:

ssh-keygen

That should create 2 files:

~dan/.ssh/id_rsa
~dan/.ssh/id_rsa.pub

do this:

cat ~dan/.ssh/id_rsa.pub > ~dan/.ssh/authorized_keys

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