首页 > 代码库 > 双机ssh互信
双机ssh互信
[root@cent6 ~]# ssh-keygen -t rsa -P ‘‘ Generating public/private rsa key pair. Enter file in which to save the key (/root/.ssh/id_rsa): /root/.ssh/id_rsa already exists. Overwrite (y/n)? y Your identification has been saved in /root/.ssh/id_rsa. Your public key has been saved in /root/.ssh/id_rsa.pub. The key fingerprint is: e3:ee:06:95:89:2c:38:8c:61:ed:ed:34:b2:ee:59:b4 root@node21.xx.com The key‘s randomart image is: +--[ RSA 2048]----+ | . | |.. . | |.+.... . o | |. +o.+o + | | .=o..S | | ...o. . | | . E .. | | .o .. | | .o oo | +-----------------+ [root@cent6 ~]# ssh-keygen -t rsa -f .ssh/id_rsa -P ‘‘ Generating public/private rsa key pair. .ssh/id_rsa already exists. Overwrite (y/n)? y Your identification has been saved in .ssh/id_rsa. Your public key has been saved in .ssh/id_rsa.pub. The key fingerprint is: 42:ae:74:9d:bf:bc:eb:a8:51:6a:2d:5f:5c:1d:72:b8 root@node21.xx.com The key‘s randomart image is: +--[ RSA 2048]----+ | | | . | | . o o | | o . . = . | | . + S E . | | . o = o . | | . = . + | | . + + . | | ..o.*o | +-----------------+ [root@cent6 ~]# ssh-copy-id -i .ssh/id_rsa.pub root@node22 The authenticity of host ‘node22 (10.12.27.122)‘ can‘t be established. RSA key fingerprint is 19:f3:39:d1:70:fb:14:d0:d8:d7:67:9b:ef:5a:a7:9c. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added ‘node22,10.12.27.122‘ (RSA) to the list of known hosts. root@node22‘s password: Now try logging into the machine, with "ssh ‘root@node22‘", and check in: .ssh/authorized_keys to make sure we haven‘t added extra keys that you weren‘t expecting. [root@cent6 ~]# ssh node22 ifconfig eth0 Link encap:Ethernet HWaddr 00:50:56:9B:78:E1 inet addr:10.12.27.122 Bcast:10.12.27.255 Mask:255.255.255.0 inet6 addr: fe80::250:56ff:fe9b:78e1/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:25102 errors:0 dropped:0 overruns:0 frame:0 TX packets:17212 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:34204510 (32.6 MiB) TX bytes:1387591 (1.3 MiB) lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
双机ssh互信
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。