Linux server configuration domain name SSH Trust

Source: Internet
Author: User

  1. Host information

    192.168.10.10 node1.zzx.com

    192.168.10.11 node2.zzx.com

  2. Configure host Domain names separately

    Hostname node1.zzx.com

    Hostname node2.zzx.com

    Modify the configuration separately vim/etc/sysconfig/network

    Modify Hostname=node1.zzx.com

    Hostnaem=node2.zzx.com

    Vim/etc/hosts

    Add 192.168.10.10 node1.zzx.com Node1

    192.168.10.11 node2.zzx.com Node2

  3. Toggle Su

  4. Create SSH Trust to configure the NOD1NODE2 host

    1. Generate an SSHD secret key


    [[email protected] ~]# ssh-keygen-t rsa-f ~/.ssh/id_rsa-p '

    Generating public/private RSA key pair.

    Created directory '/root/.ssh '.

    Your identification has been saved In/root/.ssh/id_rsa.

    Your public key has been saved in/root/.ssh/id_rsa.pub.

    The key fingerprint is:

    b7:76:48:4f:ac:f8:e7:5e:d8:89:51:e4:ff:b7:c8:7c [email protected]

    2. Copy the secret key of the Node1 host to Node2

    [Email protected] ~]# ssh-copy-id-i ssh/id_rsa.pub [email protected]

    15

    The authenticity of host ' 192.168.10.11 (192.168.10.11) ' can ' t be established.

    RSA key fingerprint is 2e:ec:e9:b9:34:2c:c4:46:84:bf:85:ad:e9:22:17:3c.

    Is you sure want to continue connecting (yes/no)? Yes

    warning:permanently added ' 192.168.10.11 ' (RSA) to the list of known hosts.

    [email protected] ' s password:

    Now try logging to the machine, with "ssh" [email protected] ' ", and check in:

    . Ssh/authorized_keys

To make sure we haven ' t added extra keys so you weren ' t expecting.


5. Test access

SSH node1 (no password required for link)

SSH node2 (no password required for link)


Linux server configuration domain name SSH Trust

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.