Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Hadoop "Permission denied (publickey,password,keyboard-interactive)" warning

I am following this tutorial to install Hadoop in my computer. After finishing the installation, when I try to launch Hadoop using this command ./start-dfs.sh, it returns me the following:

U:sbin U$ ./start-dfs.sh
Starting namenodes on [localhost]
localhost: U@localhost: Permission denied (publickey,password,keyboard-interactive).
Starting datanodes
localhost: U@localhost: Permission denied (publickey,password,keyboard-interactive).
Starting secondary namenodes [U.local]
U.local: [email protected]: Permission denied (publickey,password,keyboard-interactive).
2018-02-25 14:52:15,505 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable

I tried un-installing and installing it several times to re-check if I missed something but still I keep getting this error at the end. After looking in some online forums I came to find that the last warning : WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform is not a big deal because it gives the error when we run Hadoop in a 64 bit machine. Will you please let me know what the other two error mean and how to fix them ? I have tried many solutions posted in the internet.

like image 469
JJ123 Avatar asked Feb 25 '18 21:02

JJ123


People also ask

Why do I get permission denied (publickey) error in Linux?

Fixing Permission denied (publickey) error. So the problem lies with file permissions here. You see, when I copied the files, the USB was in Microsoft’s FAT file format. This file doesn’t support the UNIX/Linux file permissions. And hence the permissions on the copied ssh keys were changed to 777. For SSH, the file permissions are too open.

What is causing SSH permission denied(publickey/GSSAPI-keyex/GSSAPI-with-MIC)?

What is Causing SSH Permission Denied (publickey,gssapi-keyex,gssapi-with-mic)? The SSH Permission denied error appears when trying to SSH into a server: Following the Permission denied statement, the bracket contains the attempted authentication methods that failed at the initiation of the connection.

How to fix SSH permission denied error in Linux?

If you want to use a password to access the SSH server, a solution for fixing the Permission denied error is to enable password login in the sshd_config file. To do this, open the file in a text editor.

What permissions should the public key have for SSH?

Similarly, the public key shouldn’t have write and execute permissions for group and other. Now that you have put the correct permissions, you can connect to ssh again.


3 Answers

Problem is when you are trying to ssh to a server (in this case localhost) it tries to authenticate you using your credential. And stores that info. But here password-less authentication is not configured, so each time you try to ssh, it will ask you for your password, which is a problem if machines try to communicate with each other using ssh. So to setup passwordless ssh, we need to add user machine's public key to server machines ~/.ssh/authorized_keys file. In this case, both the system are same machines.

So Long story short run the following command.

cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
like image 55
sapy Avatar answered Oct 05 '22 22:10

sapy


Proceed with the following steps:

  1. Generate new keygen.

    ssh-keygen -t rsa -P '' -f ~/.ssh/id_rsa
    
  2. Register key gen:

    cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
    
like image 28
KayV Avatar answered Oct 06 '22 00:10

KayV


I did the following 3 steps to create the password less login

  1. ssh-keygen -t rsa (Press enter for each line)
  2. cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
  3. chmod og-wx ~/.ssh/authorized_keys
like image 24
Anand Prakash Avatar answered Oct 05 '22 23:10

Anand Prakash