[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 p_w_picpath 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 p_w_picpath 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互信
原创
©著作权归作者所有:来自51CTO博客作者cader005的原创作品,请联系作者获取转载授权,否则将追究法律责任
上一篇:小技巧
提问和评论都可以,用心的回复会被更多人看到
评论
发布评论
相关文章
-
ssh 双机互信配置记要
ssh 密钥认证 免密钥登入 双机互信 authorized_keys
ssh 密钥认证 免密钥登入 双机互信 -
SSH双机互信及错误解决大全
本篇主要介绍下ssh双机互信与常见错误的解决方法!
linux ssh 双机互信 -
基于Openssh实现双机互信
双机互信
用户名 配置文件 用户登录 -
SSH互信配置
ssh互信
linux ssh