title: ssh: connect to host slave port 22: Connection timed out
body: <p><strong>Edited</strong>:-</p>
  
  <p>i have done with single node cluster on two different machine,I have made one as master(192.168.1.1) and other m/c as slave(192.168.1.2), I am successfully able to ping between two machine,I have made the following changes to get into 2 node cluster Update :-</p>
  
  <p>/etc/hosts on both machines  <strong>hosts.allow</strong> </p>
  
  <pre><code>All :  Ashish-PC 192.168.1.1 : allow
  All  : slave 192.168.1.2 : allow
  </code></pre>
  
  <p>master file with</p>
  
  <pre><code>  Ashish-PC
  </code></pre>
  
  <p>slaves file with</p>
  
  <pre><code>  Ashish-PC 
    slave
  </code></pre>
  
  <p>I am getting an error while copying local host public key to remote host(slave): <strong>port 22</strong></p>
  
  <pre><code> 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
  </code></pre>
  
  <p>as well as when i start all dfs at master services then also :-</p>
  
  <pre><code> 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
  </code></pre>
  
  <p>while copying key:-</p>
  
  <pre><code>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
  </code></pre>
  
  <p>i have used cygwin and ssh is working fine on both the PC and I went through some suggestion to change the port number 22(because of ISP problem) but i dont want do that just <a href="http://www.adayinthelifeof.nl/2012/03/12/why-putting-ssh-on-another-port-than-22-is-bad-idea/" rel="nofollow">because</a>.
  thanks in advance for your help and response.</p>