1. Generate the private key and public key of RSA and DSA:
On vmoel5u4:
[Oracle @ vmoel5u4 ~] $ Ssh-keygen-T RSA
Generating public/private RSA key pair.
Enter file in which to save the key (/home/Oracle/. Ssh/id_rsa ):
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:
06: 82: C4: A3: D0: B9: D8: 02: Cf: DD: EB: 0e: 5E: DB: 22: B1 oracle@vmoel5u4.oracle.com
[Oracle @ vmoel5u4 ~] $ Ssh-keygen-T DSA
Generating public/private DSA key pair.
Enter file in which to save the key (/home/Oracle/. Ssh/id_dsa ):
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:
7f: B4: 8e: BB: 67: 18: 73: 9f: 14: Cf: 12: 47: 0d: 28: 93: AA oracle@vmoel5u4.oracle.com
On even:
[Oracle @ even ~] $ Ssh-keygen-T RSA
Generating public/private RSA key pair.
Enter file in which to save the key (/home/Oracle/. Ssh/id_rsa ):
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:
AD: 69: 3E: BC: AD: 57: EE: 03: 29: 25: B1: E5: B5: 99: 1b: AF oracle@even.oracle.com
[Oracle @ even ~] $ Ssh-keygen-T DSA
Generating public/private DSA key pair.
Enter file in which to save the key (/home/Oracle/. Ssh/id_dsa ):
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:
73: B7: 9C: BA: 83: 15: 67: 9e: A5: D9: AF: 48: 69: 96: 1b: CB oracle@even.oracle.com
2. Add the pub key to authorized_keys:
On vmoel5u4:
[Oracle @ vmoel5u4 ~] $ Cd. SSH
[Oracle @ vmoel5u4. Ssh] $ LL
Total 20
-RW ------- 1 Oracle oinstall 668 Jun 11 id_dsa
-RW-r -- 1 Oracle oinstall 616 Jun 11 id_dsa.pub
-RW ------- 1 Oracle oinstall 1675 Jun 11 id_rsa
-RW-r -- 1 Oracle oinstall 408 Jun 11 id_rsa.pub
-RW-r -- 1 Oracle oinstall 798 Jul 23 2012 known_hosts
[Oracle @ vmoel5u4. Ssh] $ cat id_dsa.pub> authorized_keys
[Oracle @ vmoel5u4. Ssh] $ LL
Total 24
-RW-r -- 1 Oracle oinstall 616 Jun 11 authorized_keys
-RW ------- 1 Oracle oinstall 668 Jun 11 id_dsa
-RW-r -- 1 Oracle oinstall 616 Jun 11 id_dsa.pub
-RW ------- 1 Oracle oinstall 1675 Jun 11 id_rsa
-RW-r -- 1 Oracle oinstall 408 Jun 11 id_rsa.pub
-RW-r -- 1 Oracle oinstall 798 Jul 23 2012 known_hosts
[Oracle @ vmoel5u4. Ssh] $ cat id_rsa.pub> authorized_keys
[Oracle @ vmoel5u4. Ssh] $ SSH even CAT/home/Oracle/. Ssh/id_dsa.pub> authorized_keys
Oracle @ even'sPassword:
[Oracle @ vmoel5u4. Ssh] $ SSH even CAT/home/Oracle/. Ssh/id_rsa.pub> authorized_keys
Oracle @ even'sPassword:
On even:
[Oracle @ even. Ssh] $ SSH vmoel5u4 CAT/home/Oracle/. Ssh/authorized_keys> authorized_keys
Iii. test:
[Oracle @ vmoel5u4 ~] $ SSH even
Last login: Tue Jun 11 18:28:06 2013 from vmoel5u4.oracle.com
[Oracle @ even ~] $
[Oracle @ even ~] $ SSH vmoel5u4
Last login: Tue Jun 11 18:27:57 2013 from even.oracle.com
[Oracle @ vmoel5u4 ~] $
The test is successful. If you do not need to enter a password, you can switch between the two hosts through SSH !!!!!