标签:
ssh-keygen -t rsa -P
‘‘
把所有机器的id_rsa.pub 汇集到一台服务器的 authorized_keys 中,然后把 authorized_keys 分发到其它的机器上。
1 在A机下生成公钥/私钥对。
ssh-keygen -t rsa -P
‘‘
敲击回车键即可,
它在/home/hadoop下生成.ssh目录,.ssh下有id_rsa和id_rsa.pub。
[hadoop@wang-PC ~]$ scp .ssh/id_rsa.pub hadoop@192.168.10.107:/home/hadoop/id_rsa.pub.hadoop_wang hadoop@192.168.10.107‘s password: |
[hadoop@chen-PC ~]$ cat id_rsa.pub.hadoop_wang >> .ssh/authorized_keys [hadoop@chen-PC ~]$ chmod 600 .ssh/authorized_keys |
[hadoop@wang-PC ~]$ ssh 192.168.10.107 |
标签:
原文地址:http://www.cnblogs.com/hujihon/p/5365050.html