ssh-keygen -t rsa -P ''
cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
chmod 600 ~/.ssh/authorized_keys
ssh
更改/etc/ssh/sshd_config
中的code
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_CONFIGio