AWS Instance Password lost after Login

Your screenshot says "server refused our key". That means you don't have the private key for your instance. I'm not sure there is a password.

You can try something like this to mount the volume then reset the password / create a new key.


As far as I know, there is no passwords set by default. Important is that you try to login with the correct user.

Depending on which AMI you selected this can vary. ec2-user for AWS Linux, ubuntu for Ubuntu, centos for CentOS.


If you feel that you cannot get access to system. You can create AMI of your instance, create a volume of that AMI and then create a new instance and mount that volume on new instance and recover the data.