title: permission denied (publickey,gssapi-keyex,gssapi-with-mic) - AWS
body: <p>2 days ago I was able to connect to my EC2 instance using the private_key.pem with ssh protocol but today when I tried to do the connection the terminal gives me:</p>
  <p>permission denied (publickey,gssapi-keyex,gssapi-with-mic)</p>
  <p>I removed the user called jhon and all the home of that user, then I created again and do the same steps for create the public and private key:</p>
  <ol start="0">
  <li>adduser jhon2 | su jhon2</li>
  <li>cd /home/jhon2/</li>
  <li>ssh-keygen -t rsa -m PEM (all the questions ENTER by default)</li>
  <li>cd .ssh/ | cat id_rsa.pub &gt; authorized_keys</li>
  <li>chmod 600 authorized_keys</li>
  </ol>
  <p>-- I create a newest .pem file called jhon2.pem which contains the id_rsa content (private_key)</p>
  <p>And from my laptop I tried again the ssh -i /home/macos/pems/jhon2.pem jhon2@instance-id, but nothing again...</p>
  <ul>
  <li>The SELINUX was disabled</li>
  <li>The sshd service status was OK</li>
  <li>I can connect to root and ec2-user</li>
  <li>command: telnet {instance-id} 22 : OK</li>
  </ul>
  <p>I don´t know what is going on :s</p>