[root@localhost ]# ls -l ~/.ssh/
total 16
-rw-r--r-- 1 root root 408 Jun 4 16:44 authorized_keys
-rw------- 1 root root 1675 Jun 4 16:43 id_rsa
-rw-r--r-- 1 root root 408 Jun 4 16:43 id_rsa.pub
-rw-r--r-- 1 root root 391 Jun 4 16:44 known_hosts
password-less ssh login test
[root@localhost ]# ssh localhost
Warning: Permanently added 'localhost' (RSA) to the list of known hosts.
root@localhost's password:
check like this
[root@localhost ]# stat -c "%a %u %g" /root
550 0 0
This value is correct information
example)
permission and owner is different then can’t login to root account with ssh-key
[root@localhost ]# chmod 550 /root
[root@localhost ]# chown root:root -R /root
Then will be works.