SSH password-less secure logon and ssh password-based Logon
Client:
Ssh-keygen-t rsa
Server
Mkdir. ssh
Chmod 755. ssh
Upload the public key from the client to the server
Scp. ssh/id_rsa.phb Server ip Address:. ssh/authorized_keys
I have four ubuntu machines that enable ssh and password-less login to each other. One machine A can log on to B, C, and D without A password, but B, C, and D cannot log on to A without A password.
Is this account a local account or an NIS account?
If it is a local account, check whether the permissions of the home directory of the account are the same. It seems that the permissions cannot be 777.
The problem should be found above A. Check whether selinux of A is disabled, and whether there is A problem with hosts configuration.
Ssh does not require a logon password. How can I configure it?
Here is an example:
192.168.1.1 --- client
192.168.1.2 --- slave
First on 192.168.1.1
Ssh-keygen
Generate id_rsa id_rsa.pub
Copy the content in id_rsa.pub
Create the authorized_keys file in the/root/. ssh/directory of 192.168.1.2
Copy the content in id_rsa.pub of 192.168.1.1 to the authorized_keys file.
Then execute ssh-keygen on 1.2.
Copy the content in id_rsa.pub to/root/. ssh/authorized_keys at 192.168.1.1.
Now you can try it!