生成密钥私钥
1、su hadoop
2、(在Hadoop01上)ssh-keygen -t rsa 三回车
3、查看 cd /home/hadoop/.ssh
4、在hadoop02与Hadoop03进行步骤1-3
5.(在hadoop02的hadoop)touch authorized_keys
6、(在hadoop01)
scp id_rsa.pub hadoop@192.168.20.112:/home/hadoop/.ssh/id_rsa.pub1
7、(在hadoop03)
scp id_rsa.pub hadoop@192.168.20.112:/home/hadoop/.ssh/id_rsa.pub3
8、(在hadoop02)
cat id_rsa.pub*>authorized_keys
9、(在hadoop02)
scp authorized_keys hadoop@192.168.20.111:/home/hadoop/.ssh/
scp authorized_keys hadoop@192.168.20.113:/home/hadoop/.ssh/
10.(三台)
su
vi /etc/selinux/config
11(三台root)
service iptables stop
12、(3台)
su hadoop
chmod 700 /home/hadoop/.ssh
chmod 600 /home/hadoop/.ssh/authorized_keys
13.测试是否成功
ssh 192.168.20.113
ifconfig
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)