Is the instance Windows? Also, are you managing your EC2 instance through Systems Manager? If so, you can use Systems Manager to reset passwords.
If you do not manage it through Systems Manager, here are the articles that provide steps outside Systems Manager.
For Windows see below (EC2 Rescue section):
If your instance is Linux and you are having an SSH issue, see below:
- I made changes to my EC2 instance's sshd_config file. Now I can't access my instance using SSH. How do I resolve this?
As always, before making changes, make sure to create a backup (EBS snapshot/AMI) to be able to roll back.
No, it's Linux or Ubuntu
Reset passwords and SSH keys on EC2 instances https://docs.aws.amazon.com/systems-manager/latest/userguide/automation-ec2reset.html
Thanks very much - This is exactly what we needed. Thanks for supplying the code too!
Should i enable an SSL connection between my loadbalancer and my EC2 instance?Accepted Answerasked a month ago
If my username and password to an EC2 instance was changed, how can I reset them?asked 21 days ago
Can't Terminate my EC2 Instanceasked 2 years ago
One of my EC2 Instance was disappeared.Accepted Answerasked 7 months ago
Why was my EC2 Instance deleted from my account?asked 2 years ago
Windows Server "Password is not available"Accepted Answerasked 7 months ago
root access direct to ec2 instanceasked 10 months ago
Replace root keypair for ec2 instanceasked 3 days ago
Get/Reset root password on a Linux EC2 instanceAccepted Answerasked 2 months ago
How can I change pw and access my web server instance?asked 10 months ago