Passphraseless ssh works but not with Hadoop

442 Views Asked by At

I have installed Hadoop on an Ubuntu machine. I set up passphraseless ssh. I can use the command "ssh localhost" and it gives me information without needing to enter a password. However when I go to Hadoop and type "sudo bin/start-all.sh" it asks me for my password (because I used sudo which is fine), but after I enter that, it will do a couple things and then ask me for the root password which I believe it's not suppose to do. I've searched for a couple days now and I only end up with answers for when "ssh localhost" doesn't work. I haven't found anything for my problem. Any help is very much appreciated.

UPDATE: It seems that I need sudo passphraseless ssh which is not the same as just passphraseless ssh. However, I am still unable to find out how to make this happen.

2

There are 2 best solutions below

0
On

I just came back to check and realized I didn't post the solution I found. When installing Hadoop and generating keys, avoid using SUDO where ever it is not absolutely necessary. If you use SUDO, it will attempt to use the root keys which are not the same as the ones generated not using SUDO. Hadoop will automatically use the current user's keys and they won't work, so it prompts for a password.

0
On

When I stop using

**sudo** ./start-dfs.sh

And used:

./start-dfs.sh

I solved the shh communication problem with the namenode