vatertime / minecraft-spot-pricing

Cloudformation template to deploy a Minecraft server

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

h3llo-wor1d opened this issue · 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.

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.

commented

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..