01. ssh-keygen -t rsa
安装
yum -y install openssh-clients
2. [root@jw01 ~]# cd ~/.ssh
[root@jw01 .ssh]# ssh-copy-id -i ~/.ssh/id_rsa.pub "-p 22 root@10.10.10.5"
3. scp ~/.ssh/authorized_keys root@192.168.44.128:/test
cat /test/authorized_keys >>/root/.ssh/authorized_keys
如1,2,3,4,5五个电脑互信,1,2,3,4发给5,5把~/.ssh/authorized 通过scp ~/.ssh/authorized_keys root@192.168.1.1,2,3,4:/test发给其它电脑再用cat /test/authorized_keys >>/root/.ssh/authorized_keys这样就可以建立互信了。