Locked Out of EC2: Restoring SSH Access With User Data
$ ssh admin@203.0.113.25 admin@203.0.113.25: Permission denied (publickey). The instance is healthy. The security group is right. The disk is fine. You simply no longer hold the key that gets you in — the laptop was reimaged, the key was never committed anywhere, or it belonged to someone who left.
AWS cannot help you here, and that is by design. The fix is to make the instance add a key you do hold, on its next boot, using the one channel you still control: user data.