title: Can't get SSH ProxyCommand to work (ssh_exchange_identification: Connection closed by remote host)
body: <p>I'm unsuccessfully trying to use SSH ProxyCommand to connect to a server via a jump box. My config is below, I'm running this command:</p>
  
  <p>ssh 10.0.2.54 -F ssh.config -vv</p>
  
  <pre><code>Host x.x.x.x
      User                   ec2-user
      HostName               x.x.x.x
      ProxyCommand           none
      IdentityFile           /Users/me/.ssh/keys.pem
      BatchMode              yes
      PasswordAuthentication no
  
  Host *
      ServerAliveInterval    60
      TCPKeepAlive           yes
      ProxyCommand           ssh -W %h:%p -q ec2-user@x.x.x.x
      ControlMaster          auto
      ControlPersist         8h
      User                   ec2-user
      IdentityFile           /Users/me/.ssh/keys.pem
  </code></pre>
  
  <p>The result is:</p>
  
  <pre><code>OpenSSH_6.2p2, OSSLShim 0.9.8r 8 Dec 2011
  debug1: Reading configuration data ssh.config
  debug1: ssh.config line 9: Applying options for *
  debug1: auto-mux: Trying existing master
  debug1: Control socket "/Users/me/.ssh/mux-ec2-user@10.0.2.54:22" does not exist
  debug2: ssh_connect: needpriv 0
  debug1: Executing proxy command: exec ssh -W 10.0.2.54:22 -q ec2-user@x.x.x.x
  debug1: identity file /Users/me/.ssh/keys.pem type -1
  debug1: identity file /Users/me/.ssh/keys.pem-cert type -1
  debug1: Enabling compatibility mode for protocol 2.0
  debug1: Local version string SSH-2.0-OpenSSH_6.2
  debug1: permanently_drop_suid: 501
  </code></pre>
  
  <p>How can I get this to work/troubleshoot the issue?</p>
  
  <p>Thanks,</p>