minecraft-spot-pricing icon indicating copy to clipboard operation
minecraft-spot-pricing copied to clipboard

Cannot connect to ec2 instance using key file "Permission denied (publickey,gssapi-keyex,gssapi-with-mic)."

Open h3llo-wor1d opened this issue 2 years ago • 2 comments

Not sure what is causing this error, I have the correct key file installed, but I can't even use the built-in AWS remote connect to see if I can fix it, so this is like really annoying and it's giving me a headache.

h3llo-wor1d avatar May 06 '22 18:05 h3llo-wor1d

if you have console access you can check if the key file is part of the ec2 you are trying to connect to. If it is not but you have updated the cloudformation script you can just set the desired count to 0 then back to 1 and kick off a new ec2 with the key file.

conrad760 avatar May 24 '22 22:05 conrad760

Hey @willow-rubenstein I also encountered this issue. I tried to update the stack with a newly created SSH key pair after the stack was up. It seems I need to bind the key pair when the EC2 instance starts. I took the dumb move -- delete the whole stack and start a new one, but this time input the key pair before it was up -- and it worked. Maybe there's better way..

jeffzys8 avatar Jun 22 '22 17:06 jeffzys8