Answer the question
In order to leave comments, you need to log in
Can I get into the Amazon EC2 server if I have closed my ssh access?
Hello. I made a huge mistake, I had 2 users on the VPS, one was root, another user added my user to root (/etc/sudoers.tmp) user ALL=(ALL:ALL) ALL
and ssh access was denied for root (/etc/ssh/sshd_config) PermitRootLogin no
I don’t remember where and what did, but there is no access by password, it always asks for a key, from the server the error is "No supported authentication methods availible (server sent: publickey)".
Actually the question is, now there is no chance to get to the server, for example, through the Amazon EC2 personal account, it remains only to delete the machine?
Answer the question
In order to leave comments, you need to log in
In general, I managed to solve this issue: I created a new machine, unmounted this volume (volume) from the old one, mounted it to the new machine and corrected sshd_config: opened access with a password without a key, allowed root to enter, appointed my user as the owner just in case file with its public key and its home folder, otherwise it was like root there, and I managed to log into the server.
I used this instruction to implement these actions, suddenly it will come in handy for someone: https://habr.com/en/post/420297/
Each instance has ec2-user access by default with a token that is generated once. This user is in sudoers and is dressed to help you if you didn't slam him too. KVM access to ec2 is not and will not be
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question