无法获得无密码登录ssh localhost,拒绝start-all.sh权限

时间:2019-03-07 05:10:01

标签: linux apache ubuntu hadoop ssh

我已经在这个问题上停留了几天。我试图在本地将hadoop设置为伪分布式。 Ive设法安装了Java和设置变量。但是我被困在ssh localhost上。我无法越过密码请求屏幕,并且start-dfs.sh不断给予我拒绝权限。我以为他们有关系吗?

fad@fad-System-Product-Name:~$ start-dfs.sh
Starting namenodes on [localhost]
localhost: fad@localhost: Permission denied (publickey,password).
Starting datanodes
localhost: fad@localhost: Permission denied (publickey,password).
Starting secondary namenodes [fad-System-Product-Name]
fad-System-Product-Name: fad@fad-system-product-name: Permission denied (publickey,password).
2019-03-06 21:05:52,321 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable

感谢您的帮助,谢谢!

1 个答案:

答案 0 :(得分:0)

将您的用户名授予超级用户访问权限,然后执行此操作

sudo apt-get install openssh-server
sudo su yourusername
ssh-keygen -t rsa -P ""

当询问详细信息时,只需按Enter

cat $HOME/.ssh/id_rsa.pub >> $HOME/.ssh/authorized_keys