Ssh secret-free login and matters needing attention
Generate key pairs:
Ssh-keygen-t rsa just press enter all the time.
The files id_rsa (private key) and id_isa.pub (public key) are generated under the .ssh directory; by copying the contents of the public key to the .ssh file under the home directory of a user on the other machine, you can log in to the other host without password ssh. You need to establish the .ssh directory under the home directory of the other machine in advance and set permissions.
Mkdir .ssh & & chmod 700.ssh
You can also test the ssh secret-free login machine on this machine:
Cat. / id_rsa.pub > >. / authorized_keys & & chmod 644 authorized_keys
Ssh localhost
What is more important is that the permissions of the file must be set correctly, otherwise secret-free login will fail.
The .ssh directory should guarantee 700 permissions
The permissions of authorized_keys files should be guaranteed to be 644.