[root@hadoop001 ~]# ssh-keygen
Generating public/private rsa key pair.
Enter file in which to save the key (/root/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /root/.ssh/id_rsa.
Your publickey has been saved in /root/.ssh/id_rsa.pub.
The key fingerprint is:
8d:29:13:12:a7:eb:1d:71:d6:cf:a4:33:3e:f8:57:f6 root@hadoop001
The key's randomart image is:
+--[ RSA 2048]----+
| . . |
| + . |
| o o o . . |
| o = + = |
| . + S = o |
| . . + o o o |
| . . . o o . |
| . .. E|
| .. |
+-----------------+
[root@hadoop001 ~]# cd .ssh
[root@hadoop001 .ssh]# scp authorized_keys root@192.168.92.201:/root/.ssh/authorized_keys
The authenticity of host '192.168.92.201 (192.168.92.201)' can't be established.
RSA key fingerprint is bf:5d:2b:37:82:ba:2e:45:16:94:cf:3f:1b:bf:7b:96.
Are you sure you want tocontinue connecting (yes/no)? yes
Warning: Permanently added '192.168.92.201' (RSA) to the list of known hosts.
root@192.168.92.201's password:
authorized_keys 100% 11881.2KB/s 00:00
[root@hadoop001 .ssh]# scp authorized_keys root@192.168.92.202:/root/.ssh/authorized_keys
The authenticity of host '192.168.92.202 (192.168.92.202)' can't be established.
RSA key fingerprint is bf:5d:2b:37:82:ba:2e:45:16:94:cf:3f:1b:bf:7b:96.
Are you sure you want tocontinue connecting (yes/no)? yes
Warning: Permanently added '192.168.92.202' (RSA) to the list of known hosts.
root@192.168.92.202's password:
authorized_keys 100% 11881.2KB/s 00:00