Traditional manual establishment of one-way trust relationship: When we use the SSH command, we will find that each time we have to enter a password, this experiment can be implemented SSH connection without entering the password. First, on the Server1 (192.168.199.128) 1, create a new user #useradd liu2, switch user #su-liu3, generate key #ssh-keygen (all hit Enter) 4. Establish a public key file #cd. ssh/#cat id_ Rsa.pub >authorized_keys#chmod Authorized_keys Second, in Server2 (192.168.199.129) 1, the first new user #useradd liu2, switch User #su- Liu3. Ssh#mkdir. Ssh#chmod. ssh/#su-root Three, back to Server1 (192.168.199.128) 1, change back to root user #su-root2, Pass the previously established key file to Server2 (192.168.199.129) #scp/home/liu//.ssh/authorized_keys 192.168.199.129:/home/liu/.ssh Four, Change Authorized_keys permissions to Server2 #chown Liu:liu/home/liu/.ssh/authorized_keys Five, test #su-liu#ssh 192.168.199.129 If you do not need to enter the password again, it proves that a one-way trust has been established.
Linux establishes a one-way trust relationship (lets SSH connect without entering a password)