Is it possible to get on a server on Amazon EC2, if you shut yourself ssh access?

Hello. Made a huge mistake, my VPS had 2 users, one is root, another user added your user to root (/etc/sudoers.tmp)
and closed for root access via ssh (/etc/ssh/sshd_config)
PermitRootLogin no
I do not remember where and what I was doing, but the password is not necessarily requests a key from the server, the error "No supported authentication methods availible (server sent: publickey)".
Actually the question, on the server there is no chance now to get into, for example, through your personal account on Amazon EC2, we can only remove a machine?
March 19th 20 at 08:54
2 answers
March 19th 20 at 08:56
In General, I could solve the issue: I have created a new machine from the old was otmetila this volume (volume) has remontiroval to a new machine and adjusted the sshd_config file: open password are allowed to enter root's appointed just in case your user own the file with his public key and his home folder and there was like a root, and managed to connect to the server.
I used these instructions to implement these steps, suddenly someone come in handy:
March 19th 20 at 08:58
Each instance by default has access to ec2-user from the token that is generated once. This user is in sudoers and dressed to help you, if you and its not slammed. KVM access to ec2 and never will be
Clearly, if the user ubuntu through which I came as soon as Incans created, then killed him :-) the prospects clear to me - Lola65 commented on March 19th 20 at 09:01
@Lola65, my condolences) all hands on the instance should not go. To configure and use ansible issues you will have) - Frederique commented on March 19th 20 at 09:04

Find more questions by tags Amazon Web ServicesSSH