Linux host trust mechanism Configuration

Source: Internet
Author: User

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 !!!!!

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.