Create an SSH password-less login localhost in the UbuntuHadoop Environment

Source: Internet
Author: User
I have been studying Hadoop recently. I have encountered a headache when I want to build the environment. I used the ssh service to connect to loaclhost In the Ubuntu environment. It took a long time to complete the setup, now I have sorted it out for reference. There are many methods on the Internet to implement ssh password-less login from the master to the slave. I will not introduce it here. The following steps are provided: Step 1. Create a key ~ /. Ssh $ ssh-keygen-trsaGener

I have been studying Hadoop recently. I have encountered a headache when I want to build the environment. I used the ssh service to connect to loaclhost In the Ubuntu environment. It took a long time to complete the setup, now I have sorted it out for reference. There are many methods on the Internet to implement ssh password-less login from the master to the slave. I will not introduce it here. The steps are as follows:

Procedure
1. Create a key

~ /. Ssh $ ssh-keygen-t rsa Generating public/private rsa key pair. enter passphrase (empty for no passphrase): (ignore) Enter same passphrase again: (ignore) Your identification has been saved in /. ssh/id_rsa. your public key has been saved in /. ssh/id_rsa.pub.

2. Add a public key to the Trust List
~ /. Ssh $ cat 192.168.1.101> authorized_keys
~ /. Ssh $

3. Start ssh-agent (previous steps)
If ssh localhost returns this prompt
Agent admitted failure to sign using the key
Ps-aux | grep agent: Check whether the ssh-agent is running. If no
~ /. Ssh $ ssh-agent

4. Add id_rsa to ssh-agent
~ /. Ssh $ ssh-add id_rsa if the prompt "cocould not open a connection to your authentication agent" is executed: ssh-agent bash 5. modify directory permissions
Sudo chmod 600 ~ /. Ssh/id_rsa sudo chmod 600 ~ /. Ssh/id_rsa.pubsudo chmod 644 ~ /. Ssh/known_hosts sudo chmod 755 ~ /. Ssh 6. login test ~ /. Ssh $ ssh localhost

Related Article

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.