Linux configuration password-free SSH login

Source: Internet
Author: User
Tags free ssh


Hadoop deployment requires SSH password-free login.

On the official website there are two words:

1.$ ssh-keygen-t Rsa-p "

2.$ Cat ~/id_rsa.pub >> ~/.ssh/authorized_keys




But there are a lot of problems on my machine that have always been SSH or require a password, write it all down here:


The 1.authorized_keys permission must be 600. And the default is not to generate a


So use the command:

$ chmod Authorized_keys


Incidentally, there is. The permissions of the directory of the SSH folder are also heard to be 700, but I looked at the next, my default is 700.


2. Test ssh localhost when finished



or to password, before also did not notice what reason, direct Baidu "SSH configuration also need password", come out a large pile, tried all not.


A few days later found can not mess, so go to Baidu "Agent admitted failure to sign using the key"

The answer seems to be a little closer:

The situation on the Internet is similar to mine, it should be said that this is the problem. The workaround is to use the Ssh-add command


But there was a problem when using Ssh-add:

So to find the solution to this sentence:

Execute ssh-agent bash to

And then execute

Ssh-add Id_rsa

This time again ssh localhost succeeded.


3. Summary:

1.$ ssh-keygen-t Rsa-p "

2.$ Cat ~/id_rsa.pub >> ~/.ssh/authorized_keys

3. $chmod ~/.ssh/authorized_keys

4.ssh localhost success is done, if you show me the same error >>5

5.ssh-add ~/.ssh/id_rsa Success then try SSH localhost, the same error reason as I >>6

6.ssh-agent Bash and then continue >>5



Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

Linux configuration password-free SSH login

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.