rhel6.x的双机互信搭建

双机互信的搭建

1准备的工作

两台主机node1  192.168.1.60

       node2  192.168.1.80

2,node1的准备工作

[root@localhost ~]# ssh-keygen -t rsa

[root@localhost ~]# ssh-copy-id -i ~/.ssh/id_rsa.pub root@centos

Are you sure you want to continue connecting (yes/no)? yes

Warning: Permanently added '192.168.1.80' (RSA) to the list of known hosts.

^C[root@localhost ~]# ssh-copy-id -i ~/.ssh/id_rsa.pub [email protected]

[root@localhost ~]# setenforce 0    //要关闭selinux防火墙

[root@localhost ~]# ssh 192.168.1.80 'ifconfig'  //在node2上执行ifconfig命令

Address 192.168.1.60 maps to bogon, but this does not map back to the address - POSSIBLE BREAK-IN ATTEMPT!

eth0      Link encap:Ethernet  HWaddr 00:0C:29:84:39:40  

         inet addr:192.168.1.80  Bcast:192.168.1.255  Mask:255.255.255.0

3,node2的准备工作

[root@localhost ~]# ssh-keygen -t rsa

29:2a:0f:b5:bf:b9:62:e3:21:c8:8d:a0:a4:b0:4e:d0 [email protected]

The key's randomart image is:

+--[ RSA 2048]----+

|                 |

|                 |

|                 |

| .       .       |

|+.E . . S        |

|Ooo. o .         |

|=++.+            |

|o  =+o .         |

| . ooo=o         |

+-----------------+

[root@localhost ~]# ssh-copy-id -i ~/.ssh/id_rsa.pub root@centos

Are you sure you want to continue connecting (yes/no)? yes

Warning: Permanently added '192.168.1.60' (RSA) to the list of known hosts.

^C[root@localhost ~]# ssh-copy-id -i ~/.ssh/id_rsa.pub [email protected]

[root@localhost ~]# setenforce 0    //要关闭selinux防火墙

[root@localhost ~]# ssh 192.168.1.60 'ifconfig'  //在node1上执行ifconfig命令

Address 192.168.1.60 maps to bogon, but this does not map back to the address - POSSIBLE BREAK-IN ATTEMPT!

eth0      Link encap:Ethernet  HWaddr 00:0C:29:84:39:40  

         inet addr:192.168.1.60  Bcast:192.168.1.255  Mask:255.255.255.0


你可能感兴趣的:(RHEL6.X,双机互信)