title: amazon ec2 ssh Permission denied (publickey)
body: <p>I run into this trouble after I ran <code>chown</code> on the home folder of my ec2 instance,
  when I use <code>sshfs</code> to mount it on my local directory.<br>
  I make a mistake here. And after this, I could no longer login to it via ssh. 
  Any way to fix this. </p>
  
  <p>the logs are:</p>
  
  <blockquote>
    <p>OpenSSH_6.0p1 Debian-3, OpenSSL 1.0.1c 10 May 2012<br>
    debug1: Reading configuration data /home/me/.ssh/config<br>
    debug1: Reading configuration data /etc/ssh/ssh_config<br>
    debug1: /etc/ssh/ssh_config line 19: Applying options for *<br>
    debug1: Connecting to ec2-54-219-20-60.us-west-1.compute.amazonaws.com
    [54.219.20.60] port 22.<br>
    debug1: Connection established.<br>
    debug1: identity file /home/me/ec2_key.pem type -1<br>
    debug1: identity file /home/me/ec2_key.pem-cert type -1<br>
    debug1: Remote protocol version 2.0, remote software version
    OpenSSH_5.9p1 Debian-5ubuntu1.1<br>
    debug1: match: OpenSSH_5.9p1 Debian-5ubuntu1.1 pat OpenSSH_5*<br>
    debug1: Enabling compatibility mode for protocol 2.0<br>
    debug1: Local version string SSH-2.0-OpenSSH_6.0p1 Debian-3<br>
    debug1: SSH2_MSG_KEXINIT sent<br>
    debug1: SSH2_MSG_KEXINIT received<br>
    debug1: kex: server->client aes128-ctr hmac-md5 none<br>
    debug1: kex: client->server aes128-ctr hmac-md5 none<br>
    debug1: sending SSH2_MSG_KEX_ECDH_INIT<br>
    debug1: expecting SSH2_MSG_KEX_ECDH_REPLY<br>
    debug1: Server host key: ECDSA
    4e:13:41:26:f5:9e:10:6d:c5:a7:65:cb:21:3c:de:f8<br>
    debug1: Host 'ec2-54-219-20-60.us-west-1.compute.amazonaws.com' is
    known and matches the ECDSA host key.<br>
    debug1: Found key in /home/me/.ssh/known_hosts:44<br>
    debug1: ssh_ecdsa_verify: signature correct<br>
    debug1: SSH2_MSG_NEWKEYS sent<br>
    debug1: expecting SSH2_MSG_NEWKEYS<br>
    debug1: SSH2_MSG_NEWKEYS received<br>
    debug1: Roaming not allowed by server<br>
    debug1: SSH2_MSG_SERVICE_REQUEST sent<br>
    debug1: SSH2_MSG_SERVICE_ACCEPT received<br>
    debug1: Authentications that can continue: publickey<br>
    debug1: Next authentication method: publickey<br>
    debug1: Trying private key: /home/me/ec2_key.pem<br>
    debug1: read PEM private key done: type RSA<br>
    debug1: Authentications that can continue: publickey<br>
    debug1: No more authentication methods to try.<br>
    Permission denied (publickey)</p>
  </blockquote>