title: Permission denied to connect to Amazon EC2 using SSH at Windows 8
body: <p>I'm starting using Amazon EC2 service. I have installed an Amazon Linux instance,  set the PEM file, opened the SSH ports and installed a GIT service.</p>
  
  <p>My local environment it's Windows 8.</p>
  
  <p>Through putty and WinSCP I can connect without problems. I have followed the docs and converted my PEM file to a PPK and everything works fine.
  The problem is when I try to do a git push from my local machine. I always get a "permission denied (public key)" when I try to connect. I have made a ssh-add to PEM file using the git bash, generated a custom key trough the GIT Bash and added this key to the key pars at the EC2 Instance and nothing works...</p>
  
  <p>If I try (using git bash) a ssh -i and specify the PEM file, I have a connection. </p>
  
  <pre><code>ssh -i c:/[PATH]/[PEM-FILE].pem ec2-user@[HOST].compute.amazonaws.com
  </code></pre>
  
  <p>If I try without -i, no connection.</p>
  
  <pre><code>$ ssh ec2-user@[HOST].compute.amazonaws.com
  Permission denied (publickey).
  </code></pre>
  
  <p>Here follows the trace with -vT command:</p>
  
  <pre><code>ssh -vT ec2-user@[HOST].compute.amazonaws.com
  OpenSSH_4.6p1, OpenSSL 0.9.8e 23 Feb 2007
  debug1: Connecting to [HOST].compute.amazonaws.com [54.201.
  110.48] port 22.
  debug1: Connection established.
  debug1: identity file [PATH]/Usuario/.ssh/identity type -1
  debug1: identity file [PATH]/Usuario/.ssh/id_rsa type 1
  debug1: identity file [PATH]/Usuario/.ssh/id_dsa type -1
  debug1: Remote protocol version 2.0, remote software version OpenSSH_6.2
  debug1: match: OpenSSH_6.2 pat OpenSSH*
  debug1: Enabling compatibility mode for protocol 2.0
  debug1: Local version string SSH-2.0-OpenSSH_4.6
  debug1: SSH2_MSG_KEXINIT sent
  debug1: SSH2_MSG_KEXINIT received
  debug1: kex: server-&gt;client aes128-cbc hmac-md5 none
  debug1: kex: client-&gt;server aes128-cbc hmac-md5 none
  debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024&lt;1024&lt;8192) sent
  debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
  debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
  debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
  debug1: Host '[HOST].compute.amazonaws.com' is known and ma
  tches the RSA host key.
  debug1: Found key in [PATH]/Usuario/.ssh/known_hosts:1
  debug1: ssh_rsa_verify: signature correct
  debug1: SSH2_MSG_NEWKEYS sent
  debug1: expecting SSH2_MSG_NEWKEYS
  debug1: SSH2_MSG_NEWKEYS received
  debug1: SSH2_MSG_SERVICE_REQUEST sent
  debug1: SSH2_MSG_SERVICE_ACCEPT received
  debug1: Authentications that can continue: publickey
  debug1: Next authentication method: publickey
  debug1: Trying private key: [PATH]/Usuario/.ssh/identity
  debug1: Offering public key: [PATH]/Usuario/.ssh/id_rsa
  debug1: Authentications that can continue: publickey
  debug1: Trying private key: [PATH]/Usuario/.ssh/id_dsa
  debug1: No more authentication methods to try.
  Permission denied (publickey).
  </code></pre>
  
  <p>So, there's a way to connect via SSH without the -i option?</p>