introduce
Easier management: two nodes, accessed through the key form, no need to enter a password.
Service requirements: some services require us to do secret key authentication before use.
Name: key authentication, password-free login, mutual trust between two machines.
step
Create a key pair
ssh-keygen -t rsa
distribution key
ssh-copy-id -i /root/.ssh/id_rsa.pub root@IP
test link
ssh root@IP hostname -I
successful
Failure