ssh-keygen -t rsa -P ‘‘
cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
chmod 600 ~/.ssh/authorized_keys
更改/etc/ssh/sshd_config
中的
RSAAuthentication yes PubkeyAuthentication yes AuthorizedKeysFile .ssh/authorized_keys
scp ~/.ssh/id_rsa.pub xxx@192.168.2.110:~/.ssh/
cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
chmod 600 ~/.ssh/authorized_keys
再以和NAMENODE机器中的同样的方式修改DATANODE机器中的SSHD_CONFIG
原文:http://my.oschina.net/u/1383439/blog/295036