title: ssh connection refused from mac os x on connecting to a remote computer
body: <p>I am running on Mac OS X 10.7.4.<br>
  I am unable to <code>ssh</code> to a remote computer, but when I do <code>ssh user@localhost</code>, it works fine.</p>
  
  <p>The error displayed is </p>
  
  <pre><code>
  OpenSSH_5.6p1, OpenSSL 0.9.8r 8 Feb 2011
  debug1: Reading configuration data /etc/ssh_config
  debug1: Applying options for *
  debug1: Connecting to web.iiit.ac.in [14.139.82.8] port 22.
  debug1: connect to address 14.139.82.8 port 22: Connection refused
  ssh: connect to host web.iiit.ac.in port 22: Connection refused
  </code></pre>
  
  <p>I have enabled the root login in System Preferences and disabled firewall.</p>
  
  <p>Also, <code>ps aux | grep ssh shows ssh-agent</code>, contains <code>/usr/bin/ssh-agent -l</code> and <code>grep ssh</code> in the output.</p>
  
  <p>On doing <code>sudo launchctl list|grep ssh</code> it shows:  </p>
  
  <ul>
  <li>0   com.openssh.sshd</li>
  </ul>
  
  <p>After this, sudo launchctl start com.openssh.sshd ; sudo launchctl list|grep ssh gives 
  45973   -   com.openssh.sshd</p>
  
  <p>Again, after checking sudo launchctl list|grep ssh after sometime, it again shows :
  -   0   com.openssh.sshd</p>