Environment
|
Machine |
Role |
IP |
|
M1 |
Source |
192.168.62.110 |
|
M2 |
Target |
192.168.62.113 |
Installation
M1
1) Create
ssh-keygen –d
[oracle@localhost oracle]$ ssh-keygen -d
Generating public/private dsa key pair.
Enter file in which to save the key (/home/oracle/.ssh/id_dsa):
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_dsa.
Your public key has been saved in /home/oracle/.ssh/id_dsa.pub.
The key fingerprint is:
42:b1:38:1a:53:d1:2a:82:d4:89:c5:3b:46:3e:80:60 oracle@localhost.localdomain
2) Check
ls -l /home/oracle/.ssh/
[oracle@localhost oracle]$ ls -l /home/oracle/.ssh/
total 8
-rw------- 1 oracle oinstall 668 May 17 21:08 id_dsa
-rw-r--r-- 1 oracle oinstall 618 May 17 21:08 id_dsa.pub
3) Copy
cp /home/oracle/.ssh/id_dsa.pub /home/oracle/
M2
1) Mkdir
mkdir /home/oracle/.ssh
2) Copy
cp /home/oracle/id_dsa.pub /home/oracle/.ssh/authorized_keys
Test
M1
1) Connect
ssh oracle@192.168.62.113
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/9542082/viewspace-277691/ ,如需转载,请注明出处,否则将追究法律责任。