1

I was trying to run Hadoop in Mac OS and I get the following errors,

$ hstart


WARNING: Attempting to start all Apache Hadoop daemons as chaklader in 10 seconds.
WARNING: This is not a recommended production deployment configuration.
WARNING: Use CTRL-C to abort.
Starting namenodes on [localhost]
localhost: Permission denied (publickey,password,keyboard-interactive).
Starting datanodes
localhost: Permission denied (publickey,password,keyboard-interactive).
Starting secondary namenodes [macs-MacBook-Pro.local]
macs-MacBook-Pro.local: Permission denied (publickey,password,keyboard-interactive).
2018-08-14 13:59:34,949 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
Starting resourcemanager
Starting nodemanagers
localhost: Permission denied (publickey,password,keyboard-interactive).

I looked into the Google and find a similar post. I mentioned that Permission denied is the error, and I didn't set up passwordless ssh correctly. For example, ssh localhost should not ask for a password.

I run the ssh localhost and it did ask for the password. As a solution to the problem, it was mentioned to execute the command,

cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys

I did that and afterward when I run the ssh localhost, I was asked for the passphrase (than the password).

$ ssh localhost

Enter passphrase for key '/Users/chaklader/.ssh/id_rsa': 
Last login: Tue Aug 14 14:03:30 2018 from ::1

The original problem was not solved. There was another post mentioned to execute the command chmod og-wx ~/.ssh/authorized_keys and after I did that, it still keeps that same.

I tried to check what is inside the id_rsa and find the info,

$ cat ~/.ssh/id_rsa.pub
ssh-rsa 

AAAAB3NzaC1yc2EAAAADAQABAAABAQDB/1Ryk4mB2/9rxpvF21JWKBOyx+hgo572zp9ZNcLmj1FcNN9saJ0AfYcmkILowEoCKgzOCbAvapd+JsPomPMsuKD37AGvfF88YWAjKPYOg3wo5JMwIp/CEyk349satGWUy+Q99288iJcS5NKkhLEN1bMOyIpgbFFxmpCdFXNSl9UfeCN4oyndWJzmnHkI6C9mu4BWibcW3PkKkwI2HVPop14m3jRjHJvmwGzRQxp/bjUVRqSZ52KTuVMYRrCsKdd048tBHOK0ujjshpBCoedtFoXt3xP0B78WZyvgFr2Pj9DrgdFI+T7gkJUv4xbmtKfCOZR7yFVwoUtgAF5k/FC1 chaklader@macs-MacBook-Pro.local


$ cat ~/.ssh/authorized_keys 
ssh-rsa 

AAAAB3NzaC1yc2EAAAADAQABAAABAQDB/1Ryk4mB2/9rxpvF21JWKBOyx+hgo572zp9ZNcLmj1FcNN9saJ0AfYcmkILowEoCKgzOCbAvapd+JsPomPMsuKD37AGvfF88YWAjKPYOg3wo5JMwIp/CEyk349satGWUy+Q99288iJcS5NKkhLEN1bMOyIpgbFFxmpCdFXNSl9UfeCN4oyndWJzmnHkI6C9mu4BWibcW3PkKkwI2HVPop14m3jRjHJvmwGzRQxp/bjUVRqSZ52KTuVMYRrCsKdd048tBHOK0ujjshpBCoedtFoXt3xP0B78WZyvgFr2Pj9DrgdFI+T7gkJUv4xbmtKfCOZR7yFVwoUtgAF5k/FC1 chaklader@macs-MacBook-Pro.local

This looks like the same info to me. What is here missed?

  • The two files will have exactly the same contents,cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys this is what that command achieves. It looks like you have a passphrase set, i would generate a new ssh-key with no passphrase, and add that key to authorized keys. – alpha Aug 14 '18 at 8:45
  • Why would that be helped? – Arefe Aug 14 '18 at 8:46
  • because you have to enter a passphrase to log in? so you haven't set up passwordless ssh.... – alpha Aug 14 '18 at 8:53
  • @alpha That's incorrect. The command appends the pubkey to the authorized keys file. It's just that the authorized keys file was empty, so after running the command the OP ended up with two identical files. – dr01 Aug 14 '18 at 10:11
  • Later I kept blank for the pass phrase and it worked – Arefe Aug 14 '18 at 15:40
1

The private key should not be protected by a password. Check this post for checking that

Are the permissions on your private key properly set? It should be set as:

  chmod 600  ~/.ssh/id_rsa
  • The issue was the key was required a pass phrase – Arefe Aug 17 '18 at 2:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.