Rajneesh Sahay
Rajneesh Sahay

Reputation: 21

Hadoop : Permission denied (publickey,password, keyboard-interactive)

While installing Hadoop I got many errors but this one just doesn't go. No matter what I do, it keeps popping again and again. As soon as I am starting Hadoop by the command ./start-all.sh, I get the error:

localhost: rajneeshsahai@localhost: Permission denied (publickey,password,keyboard-interactive)

Error logs:

Starting namenodes on [localhost]
localhost: rajneeshsahai@localhost: Permission denied (publickey,password,keyboard-interactive).

Starting datanodes
localhost: rajneeshsahai@localhost: Permission denied (publickey,password,keyboard-interactive).

Starting secondary namenodes [MacBook-Air.local]
MacBook-Air.local: [email protected]: Permission denied (publickey,password,keyboard-interactive).

2020-05-29 18:42:06,106 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable

Starting resourcemanager
resourcemanager is running as process 2937.  Stop it first.

Starting nodemanagers
localhost: rajneeshsahai@localhost: Permission denied (publickey,password,keyboard-interactive).

I already tried the following things:

  1. ssh-keygen -t rsa

    cat ~/.ssh/id-rsa.pub >> ~/.ssh/authorized_keys

    chmod 600 ~/.ssh/authorized_keys

    I think repeating this process has created multiple keys in my system.

  2. sudo passwd

  3. Configured /etc/ssh/sshd_config

    (i) Changed PermitRootLogin prohibit-password to PermitRootLogin yes

    (ii) Changed PasswordAuthentication no to PasswordAuthentication yes

    I do have one doubt: Do I have to remove the hash tag (#) from the lines?

I am using macOS Catalina.

Upvotes: 2

Views: 6041

Answers (2)

Maxim
Maxim

Reputation: 11

On Windows WSL2 Ubuntu container you have to restart the ssh service to make it available for Hadoop. You could try to run the Hadoop in a docker container. See https://github.com/big-data-europe/docker-hadoop.

In the Ubuntu 20.04 container each time before I start Hadoop I restart the ssh service.

sudo service ssh restart

For more details see the following tutorial https://dev.to/samujjwaal/hadoop-installation-on-windows-10-using-wsl-2ck1.

Upvotes: 0

Marco Ancona
Marco Ancona

Reputation: 2163

You can try the following:

$ ssh-keygen -t rsa -P '' -f ~/.ssh/id_rsa
$ cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
$ chmod 0600 ~/.ssh/authorized_keys

Upvotes: 2

Related Questions