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.
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)? 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.
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.
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.
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
Proceed with the following steps:
Generate new keygen.
ssh-keygen -t rsa -P '' -f ~/.ssh/id_rsa
Register key gen:
cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
I did the following 3 steps to create the password less login
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With