Because you want to install Hadoop so you need to set up SSH password-free login, SSH installation is not described here:
My system is ubuntu15.10, began to follow the online a lot of steps to configure, and finally found the login password, login multiple times is also the case
Finally, the online search of a lot of information to solve the problem. So write down and see if you can help the classmates who are also experiencing such problems.
The following describes the specific configuration steps:
Ssh-keygen -t RSA
This command generates a public-private key, and then prompts you to save the path of these keys, direct carriage return, the default path is the line (~/.SSH, this path is the default)
then enter the password. You can also directly enter the blank password and confirm. As shown (online looking for the figure):
- Then open the ~/.ssh folder to see the following two files (id_rsa: Private key id_rsa.pub: Public key):
Authorized_keys and known_hosts files are not started.
The generated public key is added to the authorization file Authorized_keys, which is not at first, and is automatically generated after the command is run.
- We need to copy the public key on the client to the SSH server or to the host to create a trust relationship with the client. Run the following command to replicate the client's public key to the service side.
Because I am configured on a single machine, so I also use my own machines, namely: [email protected] Hadoop is the user name, master is the host name
(I did not add this step before the configuration, and finally did not succeed, if you are the case, add this step to try)
- The configuration file needs to be modified as follows:
- Finally, you can use: ssh localhost command to try not to enter the password can be logged in, the first time may be required to enter a password, the second time will not
Workarounds for SSH password-free login setup failed