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