1.所有機器:執(zhí)行ssh-keygen 生成秘鑰
2.ssh-copy-id -i ~/.ssh/id_rsa.pub hucom@192.168.xx.xx
使用ssh-copy-id設置master可以免密登錄其他的子服務器
3.使用scp copy 其他節(jié)點的id_rsa.pub到master服務器
4.使用 cat?id_rsa.pub >>?authorized_keys
將免密認證copy合并到authorized_keys
將authorized_keys放到所有的服務器的.ssh目錄下