amazon-web-servicesamazon-ec2ssh

user@<ip address> : Permission denied (publickey,gssapi-keyex,gssapi-with-mic)


I did this command ssh -i EC2tutorial.pem user@<ip addresss> and it is showing only this error Permission denied (publickey,gssapi-keyex,gssapi-with-mic) and nothing more what do i do


Solution

  • I thought ec2-user is the username of the tutor's machine so I used mine, but after using ec2-user@<ipaddress>, it worked here are some referal links if someone needs it in future -> https://docs.aws.amazon.com/quickstarts/latest/vmlaunch/step-2-connect-to-instance.html#sshclient