hadoop 环境搭建问题
创建一个SSH密钥# ssh-keygen -t rsa -P '' -f ~/.ssh/id_rsa
Generating public/private rsa key pair.
/root/.ssh/id_rsa already exists.
Overwrite (y/n)? yes
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:
f8:d4:aa:99:55:23:b3:c9:2e:81:ea:03:69:e9:d7:c9 root@oplinux.hehaibo.com
# cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
# ssh localhost
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: UNPROTECTED PRIVATE KEY FILE! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
#提示不能通过ssh localhost直接登录 权限有问题 把权限降到0600就ok
Permissions 0666 for '/root/.ssh/id_rsa' are too open.
It is recommended that your private key files are NOT accessible by others.
This private key will be ignored.
bad permissions: ignore key: /root/.ssh/id_rsa
Enter passphrase for key '/root/.ssh/id_rsa':
Last login: Tue Mar6 19:07:51 2012 from 192.168.91.1
#解决办法 执行如下命令
# chmod 0600 ~/.ssh/id_rsa
#登陆成功
# ssh localhost
Last login: Tue Mar6 19:10:52 2012 from oplinux.hehaibo.com
#
页:
[1]