ssh -keygen -t rsa (四个回车)
执行完这个命令后,会生成两个文件id_rsa(私钥),id_rsa.pub(公钥)
将公钥拷贝到要免密登录的目标机器上
ssh-copy-id localhost
ssh-copy-id hadoop01
ssh-copy-id hadoop02
ssh-copy-id hadoop03
ssh -keygen -t rsa (四个回车)
执行完这个命令后,会生成两个文件id_rsa(私钥),id_rsa.pub(公钥)
将公钥拷贝到要免密登录的目标机器上
ssh-copy-id localhost
ssh-copy-id hadoop01
ssh-copy-id hadoop02
ssh-copy-id hadoop03