title: Host key verification failed - amazon EC2
body: <p>I am working with win 7 and git bash as well as an amazon EC2 instance. I tried to log into my instance:</p>
  
  <pre><code>$ ssh -i f:mykey.pem ubuntu@ec2-52-10-**-**.us-west-2.compute.amazonaws.com
   @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
   @    WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!     @
   @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
   IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
   Someone could be eavesdropping on you right now (man-in-the-middle attack)!
   It is also possible that a host key has just been changed.
   The fingerprint for the ECDSA key sent by the remote host is
   71:00:d7:d8:a------------------26.
   Please contact your system administrator.
   Add correct host key in /m/.ssh/known_hosts to get rid of this message.
   Offending ECDSA key in /m/.ssh/known_hosts:27
   ECDSA host key for ec2-52-10-**-**.us-west-2.compute.amazonaws.com has changed and you have request
   ed strict checking.
   Host key verification failed.
  </code></pre>
  
  <p>Logging in like this has worked fine in the past, but this problem started after I rebooted my EC2 instance. How can I get this working again?</p>
  
  <p>edit:</p>
  
  <pre><code>$ ssh -i f:tproxy.pem ubuntu@ec2-52-10-**-**.us-west-2.compute.amazonaws.com
  ssh: connect to host ec2-52-10-**-**.us-west-2.compute.amazonaws.com port 22: Bad file number
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/A8olb.png" alt="enter image description here"></p>
  
  <p>tried again:</p>
  
  <pre><code>The authenticity of host 'ec2-52-10-**-**.us-west-2.compute.amazonaws.com (52.10.**-**)' can't be
  established.
  ECDSA key fingerprint is d6:c4:88:-----------fd:65.
  Are you sure you want to continue connecting (yes/no)? y
  Please type 'yes' or 'no': yes
  Warning: Permanently added 'ec2-52-10-**-**.us-west-2.compute.amazonaws.com,52.10.**-**' (ECDSA) t
  o the list of known hosts.
  Permission denied (publickey).
  </code></pre>
  
  <p>what should I do now?</p>