title: Problems trying to ssh to AWS EC2 instance
body: <p>I've been using an EC2 server with LAMP for a few months now and all of a sudden I can't connect to it via ssh. I run the same command on Cygwin I've been running since I've started working with it, which is:</p>
  
  <pre><code>ssh -i ./Desktop/keys/teste.pem ubuntu@54.94.211.146 -v
  </code></pre>
  
  <p>At first I was getting this message on the debugger:</p>
  
  <pre><code>$ ssh -i Desktop/teste.pem -v ubuntu@54.94.211.146
  OpenSSH_6.7p1, OpenSSL 1.0.1j 15 Oct 2014
  debug1: Connecting to 54.94.211.146 [54.94.211.146] port 22.
  debug1: Connection established.
  debug1: key_load_public: No such file or directory
  debug1: identity file Desktop/teste.pem type -1
  debug1: key_load_public: No such file or directory
  debug1: identity file Desktop/teste.pem-cert type -1
  debug1: Enabling compatibility mode for protocol 2.0
  debug1: Local version string SSH-2.0-OpenSSH_6.7
  ssh_exchange_identification: Connection closed by remote host
  </code></pre>
  
  <p>Then I tried reeboting the EC2 instance through the AWS dashboard. Now I get this:</p>
  
  <pre><code>$ ssh -i ./Desktop/keys/teste.pem ubuntu@54.94.211.146 -v
  OpenSSH_6.7p1, OpenSSL 1.0.1j 15 Oct 2014
  debug1: Connecting to 54.94.211.146 [54.94.211.146] port 22.
  debug1: Connection established.
  debug1: key_load_public: No such file or directory
  debug1: identity file ./Desktop/keys/teste.pem type -1
  debug1: key_load_public: No such file or directory
  debug1: identity file ./Desktop/keys/teste.pem-cert type -1
  debug1: Enabling compatibility mode for protocol 2.0
  debug1: Local version string SSH-2.0-OpenSSH_6.7
  debug1: Remote protocol version 2.0, remote software version OpenSSH_6.6.1p1 Ubuntu-2ubuntu2
  debug1: match: OpenSSH_6.6.1p1 Ubuntu-2ubuntu2 pat OpenSSH_6.6.1* compat 0x04000000
  debug1: SSH2_MSG_KEXINIT sent
  Connection closed by 54.94.211.146
  </code></pre>
  
  <p>I have absolutely no idea what happened. I neither remember doing anything unusual nor messing with the identity file, as the debugger suggests the problem is with the identification. I've already tried to ssh with a different machine and a backup of 'teste.pem', the errors are the same. I'm really at a loss.</p>
  
  <p>Thanks in advance!</p>
  
  <p>Edit: At @asimovwasright 's request, I ran the command without the id file and got this:</p>
  
  <pre><code>$ ssh -v ubuntu@54.94.211.146
  OpenSSH_6.7p1, OpenSSL 1.0.1j 15 Oct 2014
  debug1: Connecting to 54.94.211.146 [54.94.211.146] port 22.
  debug1: Connection established.
  debug1: key_load_public: No such file or directory
  debug1: identity file /cygdrive/c/Users/Gabriel/.ssh/id_rsa type -1
  debug1: key_load_public: No such file or directory
  debug1: identity file /cygdrive/c/Users/Gabriel/.ssh/id_rsa-cert type -1
  debug1: key_load_public: No such file or directory
  debug1: identity file /cygdrive/c/Users/Gabriel/.ssh/id_dsa type -1
  debug1: key_load_public: No such file or directory
  debug1: identity file /cygdrive/c/Users/Gabriel/.ssh/id_dsa-cert type -1
  debug1: key_load_public: No such file or directory
  debug1: identity file /cygdrive/c/Users/Gabriel/.ssh/id_ecdsa type -1
  debug1: key_load_public: No such file or directory
  debug1: identity file /cygdrive/c/Users/Gabriel/.ssh/id_ecdsa-cert type -1
  debug1: key_load_public: No such file or directory
  debug1: identity file /cygdrive/c/Users/Gabriel/.ssh/id_ed25519 type -1
  debug1: key_load_public: No such file or directory
  debug1: identity file /cygdrive/c/Users/Gabriel/.ssh/id_ed25519-cert type -1
  debug1: Enabling compatibility mode for protocol 2.0
  debug1: Local version string SSH-2.0-OpenSSH_6.7
  debug1: Remote protocol version 2.0, remote software version OpenSSH_6.6.1p1 Ubuntu-2ubuntu2
  debug1: match: OpenSSH_6.6.1p1 Ubuntu-2ubuntu2 pat OpenSSH_6.6.1* compat 0x04000000
  debug1: SSH2_MSG_KEXINIT sent
  Connection closed by 54.94.211.146
  </code></pre>
  
  <p>Basically the same error as before, so I guess the identity file is not to blame.</p>