I've run into this issue before and rebooting the instance, I assumed, reset the /root/.ssh/authorized_keys and the /home/ubuntu/.ssh/authorized_keys files.
I've reboot the instance twice now and I'm still not able to SSH in. I just get this:
Connection closed by x.x.x.x
Any ideas?
reset as in delete them and create new files? If so permissions are bad that that is a security check by ssh.
needs to be the following
Rebooting the instance won't reset those files but taking an AMI of the instance and creating a new instance from the ami will cause cloudinit to redo those files when it injects the ssh key on first boot of the new instance. If that doesn't work then you will need to attach the volume to another healthy instance and fix the files from there.