title: AWS - Disconnected : No supported authentication methods available (server sent :publickey)
body: <p>SSH to my AWS server just broke for both Putty and Filezilla. I'm making some effort for this post to be a comprehensive troubleshooting list, so if you share links to other stack overflow pages, I'll edit them into the question.</p>
  
  <pre><code>Disconnected : No supported authentication methods available (server sent :publickey)
  </code></pre>
  
  <p><br>
  The error is familiar from when I set up the connection almost a year ago. If you're setting up AWS SSH for the first time, these address the most common problems:</p>
  
  <ul>
  <li><b>Wrong username:</b> <a href="https://stackoverflow.com/questions/21535907/disconnected-no-supported-authentication-methods-available-server-sent-publi">Disconnected : No supported authentication methods available (server sent :publickey)</a></li>
  <li><b>Incorrect .ppk file:</b> <a href="https://stackoverflow.com/questions/19096348/unable-to-connect-to-amazon-server-using-putty">Unable to connect to amazon server using putty</a></li>
  </ul>
  
  <p>However, the only thing I could think that would impact a previously working system is:</p>
  
  <ul>
  <li><b>Wrong IP:</b> Restarting an AWS instance (or creating an image) is not guaranteed to keep the same IP address. This would obviously have to be updated in putty. </li>
  </ul>
  
  <p>What other possibilities are there? </p>
  
  <p><em>Solution to this one (per the accepted post below) is that for AWS EC2 all 3 of these need to have proper permissions (777 <strong>not</strong> ok for any of these). Here's one example that works:</em></p>
  
  <pre><code>/home/ec2-user/ - 700
  /home/ec2-user/.ssh/ - 600
  /home/ec2-user/.ssh/authorized_keys - 600
  </code></pre>
  
  <p>/var/log/secure will tell you which one is throwing an error, consult this video tutorial to get access if you're completely locked out:
  <a href="http://d2930476l2fsmh.cloudfront.net/LostKeypairRecoveryOfLinuxInstance.mp4" rel="noreferrer">http://d2930476l2fsmh.cloudfront.net/LostKeypairRecoveryOfLinuxInstance.mp4</a></p>