设定有三台虚拟机,生成密钥后,将密钥保存到hadoop101,再由hadoop101,分发给另外两台虚拟机

#查看是否安转
sudo yum list installed |grep openssh
#z输入回车生成密钥
ssh-keygen -t rsa
#传递密钥
ssh-copy-id hadoop101
#密钥的分发
scp authorized_keys hadoop103:~/.ssh/