# ssh配置authorized_keys后仍然需要输入密码的问题

[hadoop@guest1 .ssh]$ll total 16-rw-r--r--1 hadoop hadoop 395 Jan 1218:37 authorized_keys -rw-------1 hadoop hadoop 1675 Jan 1218:36 id_rsa -rw-r--r--1 hadoop hadoop 395 Jan 1218:36 id_rsa.pub -rw-r--r--1 hadoop hadoop 796 Jan 6 08:40 known_hosts #修改后，sshd就可以正常使用authorized_keys文件了[hadoop@guest1 ~]$ ssh localhost
Last login: Sat Jan 1218:40:332013 from localhost
[hadoop@guest1 ~]$exitlogout Connection to localhost closed. [hadoop@guest1 ~]$

“man sshd”命令查看对authorized_keys文件的描述如下：

man sshd
.....
~/.ssh/authorized_keys
Lists the public keys (DSA/ECDSA/RSA) that can be used for logging in as this user.  The format of
this file is described above.  The content of the file is not highly sensitive, but the recommended
permissions are read/write for the user, and not accessible by others.

If this file, the ~/.ssh directory, or the user's home directory are writable by other users, then the
file could be modified or replaced by unauthorized users.  In this case, sshd will not allow it to be
used unless the StrictModes option has been set to “no”.
........
posted @ 2016-07-14 18:33  哼哼哈哈二将  阅读(19956)  评论(0编辑  收藏