I have disabled ec2-user ssh access by removing authorization key and turn on public key authentication by mistake. Now I unable to access the server.
Is there any way to gain access back?
I have disabled ec2-user ssh access by removing authorization key and turn on public key authentication by mistake. Now I unable to access the server.
Is there any way to gain access back?
It is possible to recover the ssh access to your instance in certain cases. The exact steps are described in this page of the AWS docs.
Warning:
Do not perform this procedure if your instance is a store-backed instance, because this recovery procedure requires a stop and start of your instance, and any data will be lost. For more information, see Determining the Root Device Type of Your Instance.