I am trying to create a passwordless connect (with keys) between two linux boxes. I have done it 20 or 30 times before but this is the first time it is fighting me and trying it on a fresh install of Centos 7. I create the key, ssh-copy-id it over, and it looks all happy. When I log in it still asks for a password.
root@client:~# ssh-keygen
Generating public/private rsa key pair.
Enter file in which to save the key (/root/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /root/.ssh/id_rsa.
Your public key has been saved in /root/.ssh/id_rsa.pub.
The key fingerprint is:
(client-key) root@client
The key's randomart image is:
+--[ RSA 2048]----+
| E. |
| . . |
| o |
| . +.|
| o S ..o =|
| o . . . ooo.|
| . . ..=+ .|
| . .=. . |
| ..oo.oo |
+-----------------+
root@client:~# ssh-copy-id -i .ssh/id_rsa.pub central@server
central@server's password:
Now try logging into the machine, with "ssh 'central@server'", and check in:
~/.ssh/authorized_keys
to make sure we haven't added extra keys that you weren't expecting.
root@client:~# ssh central@server
central@server's password: (password entered at this point to make sure I had it correct)
Last login: Mon Jul 21 14:06:43 2014
[central@server ~]$
I have found numerous mentions to checking permissions on the .ssh folders and the authorized_keys file and have tried them in all kinds of different combinations. I have wiped out the .ssh folders on both servers and started from scratch. SElinux is disabled on both boxes, and no there was no password set on the keyfile at any time.
Any thoughts?