Workarounds for SSH password-free login setup failed

Source: Internet
Author: User
Tags ssh server

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:

    • First enter the command:
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.

    • Then use the command:

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.