Hadoop“权限被拒绝(公钥,密码,键盘交互)"警告 [英] Hadoop "Permission denied (publickey,password,keyboard-interactive)" warning

查看:411
本文介绍了Hadoop“权限被拒绝(公钥,密码,键盘交互)"警告的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在关注在我的计算机上安装Hadoop的教程.完成安装后,当我尝试使用此命令./start-dfs.sh启动Hadoop时,它将返回以下内容:

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: U@pc.local: 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

我尝试多次卸载并安装它,以重新检查是否错过了某些东西,但最后仍然不断出现此错误.在一些在线论坛上浏览后,我发现最后一个警告:WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform没什么大不了的,因为当我们在64位计算机上运行Hadoop时,它会给出错误.您能否让我知道另外两个错误的含义以及如何解决?我已经尝试了许多发布在互联网上的解决方案.

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.

推荐答案

问题是,当您尝试SSH到服务器(在本例中为localhost)时,它将尝试使用您的凭据对您进行身份验证.并存储该信息.但是这里没有配置无密码认证,因此,每次尝试使用ssh时,都会要求您输入密码,如果 machines try to communicate with each other 使用ssh会出现问题.因此,要设置无密码的ssh,我们需要将用户计算机的公钥添加到服务器计算机 ~/.ssh/authorized_keys 文件中.在这种情况下,两个系统都是同一台机器.

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.

长话短说,请运行以下命令.

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

这篇关于Hadoop“权限被拒绝(公钥,密码,键盘交互)"警告的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆