客户端生成公私钥
ssh-keygen -t rsa
上传公钥到服务器
ssh-copy-id hadoop02
ssh-copy-id hadoop03
ssh-copy-id hadoop04
各台机器上均重复以上步骤就可以互相免密登录了
测试免密登录
ssh root@hadoop03
ssh-keygen -t rsa
ssh-copy-id hadoop02
ssh-copy-id hadoop03
ssh-copy-id hadoop04
各台机器上均重复以上步骤就可以互相免密登录了
ssh root@hadoop03