2、在node1生成密钥对
[oracle@leopard ~]$ ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/home/oracle/.ssh/id_rsa): <--空
Created directory '/home/oracle/.ssh'.
Enter passphrase (empty for no passphrase): <--空
Enter same passphrase again: <--空
Your identification has been saved in /home/oracle/.ssh/id_rsa.
Your public key has been saved in /home/oracle/.ssh/id_rsa.pub.
The key fingerprint is:
1f:b8:c3:c0:8c:69:a4:76:02:38:1a:1e:ed:06:06:30 oracle@leopard.uplook.com
The key's randomart image is:
+--[ RSA 2048]----+
|E |
|o.. |
|=+ .. |
|+++o = . |
|..+o= + S . |
| ..+ o o . |
| + . |
| . |
| |
+-----------------+
[oracle@leopard .ssh]$ pwd
/home/oracle/.ssh
[oracle@leopard .ssh]$ ls
id_rsa(私钥) id_rsa.pub(公钥)