ssh:连接到主机从端口22:连接超时

时间:2013-08-19 08:40:25

标签: hadoop ssh cygwin port master-slave

被修改: -

我已经在两台不同的机器上完成了单节点集群,我已经将其中一台作为主机(192.168.1.1)和其他m / c作为从机(192.168.1.2),我成功地能够在两台机器之间ping通,我已进行以下更改以进入2节点群集更新: -

两台机器上的

/ etc / hosts hosts.allow

All :  Ashish-PC 192.168.1.1 : allow
All  : slave 192.168.1.2 : allow

主文件

  Ashish-PC

的奴隶文件
  Ashish-PC 
  slave

将本地主机公钥复制到远程主机(从站)时出错:端口22

 ssh-copy-id -i ~/.ssh/id_rsa.pub hadoop@slave
 /usr/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any    that are already installed
/usr/bin/ssh-copy-id: ERROR: ssh: connect to host slave port 22: Connection timed out

以及当我在主服务上启动所有dfs时,还会: -

 bin/start-dfs.sh
starting namenode, logging to /usr/local/hadoop/libexec/../logs/hadoop-Ashish-namenode-  Ashish-PC.out
slave: ssh: connect to host slave port 22: Connection timed out
Ashish-PC: starting secondarynamenode, logging to       /usr/local/hadoop/libexec/../logs/hadoop-Ashish-secondarynamenode-Ashish-PC.out
slave: ssh: connect to host slave port 22: Connection timed out
复制键时

: -

ssh-copy-id -i ~/.ssh/id_rsa.pub hadoop@slave
/usr/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed
/usr/bin/ssh-copy-id: ERROR: ssh: connect to host slave port 22: Connection timed out

我使用过cygwin,ssh在PC上工作正常,我经历了一些改变端口号22的建议(因为ISP问题),但我不想这样做because。 提前感谢您的帮助和回应。

2 个答案:

答案 0 :(得分:2)

允许主人通过Windows防火墙进行通信,在家庭和公共场合添加sshd ... enter image description here

确保在每个节点上启动sshd服务以进行通信。

答案 1 :(得分:0)

这对我有用:

1

sudo vi /etc/ssh/sshd_config 

2。 删除评论

#Port 22 
#Protocol 2