title: Not working scp command: Connection closed by remote host (Mac OS X)
body: <p>I'm working on a remote server through Mac terminal, since I updated it to OSX 10.10 from 10.5 I started receiving this message every time I try to <code>scp</code> from the server to my computer:</p>
  
  <pre><code>ssh_exchange_identification: Connection closed by remote host
  lost connection
  </code></pre>
  
  <p>If I perform <code>scp</code> backwards (copying from mac to server) it works just fine, and it works fine if I do it form another mac.</p>
  
  <p>If I do a verobse <code>scp</code>, it gives me this:</p>
  
  <pre><code>Executing: program /usr/bin/ssh host xx.xx.xx.x, user User, command scp -v -t /Users/User
  OpenSSH_5.3p1, OpenSSL 1.0.1e-fips 11 Feb 2013
  debug1: Reading configuration data /etc/ssh/ssh_config
  debug1: Applying options for *
  debug2: ssh_connect: needpriv 0
  debug1: Connecting to xx.xx.xx.x [xx.xx.xx.x] port 22.
  debug1: Connection established.
  debug1: identity file /home/user/.ssh/identity type -1
  debug1: identity file /home/user/.ssh/identity-cert type -1
  debug1: identity file /home/user/.ssh/id_rsa type -1
  debug1: identity file /home/user/.ssh/id_rsa-cert type -1
  debug1: identity file /home/user/.ssh/id_dsa type -1
  debug1: identity file /home/user/.ssh/id_dsa-cert type -1
  debug1: identity file /home/user/.ssh/id_ecdsa type -1
  debug1: identity file /home/user/.ssh/id_ecdsa-cert type -1
  ssh_exchange_identification: Connection closed by remote host
  lost connection
  </code></pre>
  
  <p>I tried looking in the various host, config, ssh files but I didn't mange to solve much.</p>