Method/Step
Verify SSH remote login, not for the two machines without the secret processing, log in, is required to enter the password
The local system executes the SSH-KEYGEN-T RSA command, generating the key file
View the generated key file in the appropriate directory, where: Id_rsa is the private key file and Id_rsa.pub is the public key file
The local machine executes commands such as: ssh-copy-id-i ~/.ssh/id_rsa.pub [email protected], transferring the public key file to the remote machine and taking effect
Once again using the password-free user to log on to the remote machine, no passwords are required, the secret login process is complete
View the remote machine's Authorized_keys file to see the corresponding change: The local machine's public key has been added to the remote machine's configuration file.
From https://jingyan.baidu.com/album/c275f6ba08267ae33c756758.html?picindex=2
(go) The correct way to implement SSH password-free login for Linux