Host information
192.168.10.10 node1.zzx.com
192.168.10.11 node2.zzx.com
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
Toggle Su
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