在设置hadoop时SSH出现问题 [英] Something goes wrong with the SSH while setting up hadoop
问题描述
我确定问题是关于SSH.I得到openssh服务器,并且这样做:
hadoop00 @ WebsoftStation:〜$ ssh-keygen -t dsa -P - f〜/ .ssh / id_dsa
hadoop00 @ WebsoftStation:〜/ .ssh $ cat〜/ .ssh / id_dsa.pub >> authorized_keys
成功ssh我的本地主机像这样:
hadoop00 @ WebsoftStation:〜$ ssh localhost
它工作。
所以我改变了路径到hadoop然后:
hadoop00 @ WebsoftStation:/ usr / local / hadoop $ sudo bin / start-all.sh
[sudo] hadoop00的密码:
启动namenode,记录到/usr/local/hadoop/libexec/../logs/hadoop-root-namenode-WebsoftStation.out
root @ localhost的密码:
root @ localhost的密码:localhost:权限被拒绝,请重试。
那么问题是什么?
您已经为当前帐户设置了无密码的ssh。因为,当你可以使用ssh localhost没有任何问题,你需要做的下一件事是给你的脚本的执行权限。
执行以下命令:
chmod + x bin / *。为所有脚本分配执行权限
./start.all ---->执行脚本
注意:Hadoop也可以在没有使用hadoop-daemon .sh脚本。使用无密码ssh的唯一优势是,./start.all脚本会在每个节点中代表您执行此操作。
I'm a new fish for hadoop.I installed Ubuntu 12.10 on my computer and I wanna install Hadoop in pseudo-distributed mode on one single node.I searched and get lots of tutorials but I have a problem with the SSH.I did what the tutorial said.
I am sure the problem is about the SSH.I get the openssh-server,and had done this:
hadoop00@WebsoftStation:~$ssh-keygen -t dsa -P "" -f ~/.ssh/id_dsa
hadoop00@WebsoftStation:~/.ssh$cat ~/.ssh/id_dsa.pub >> authorized_keys
Then I can successfully ssh my localhost like this:
hadoop00@WebsoftStation:~$ssh localhost
It worked.
So I changed the path to hadoop and then:
hadoop00@WebsoftStation:/usr/local/hadoop$ sudo bin/start-all.sh
[sudo] password for hadoop00:
starting namenode, logging to /usr/local/hadoop/libexec/../logs/hadoop-root-namenode-WebsoftStation.out
root@localhost's password:
root@localhost's password: localhost: Permission denied, please try again.
So,what's the problem?
You have setup password-less ssh for only your current account. Since, when you can use ssh localhost without any problem, the thing you need to do next is giving execution permission to your scripts. Execute the following commands:
chmod +x bin/*.sh ---> assigns execution permission to all the scripts
./start.all ----> executes the script
Note: Hadoop can also be run without having password-less ssh setup using hadoop-daemon.sh script. The only advantage with password-less ssh is that, the ./start.all, script will take the trouble of doing that on behalf of you in each of the nodes.
这篇关于在设置hadoop时SSH出现问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!