- Install SSH
Hadoop uses SSH for communication. In this case, we need to set the password to null, that is, no password is required to log on. This eliminates the need to enter a secret during each communication. The installation is as follows:
Enter "Y" for installation and wait for the automatic installation to complete.
Start the service after installing SSH
Run the following command to verify that the service is properly started:
You can see that SSH is started normally;
Set password-free logon to generate the private key and public key:
In/root /. two files are generated in SSH: id_rsa and id_rsa.pub. id_rsa is the private key and id_rsa.pub is the public key. We append the Public Key id_rsa.pub to authorized_keys, because authorized_keys is used to save the public key content that allows users to log on to the SSH client as the current user:
Check whether you can log on to SSH without a password:
Enter "yes" to continue logging on:
Indicates that we have successfully logged on;
Run the following command to exit localhost:
You do not need a password when logging on to localhost again, as shown in: