I mistakenly edited the /etc/deny.hosts
file and added following entry-
ALL: ALL
. Now, I'm unable to do SSH into it. After searching, I found that it denies all users from accessing the system. Does any one have idea on how to overcome this?
If the Root device of the Instance is an EBS, below steps will help you to come out of the situation.
Instance1
)Instance2
) as a non-Root device.Instance2
lsblk
and then try to mount the volume.deny.hosts
file, it will be under /mountpath/etc/deny.hosts
Instance2
and re-Attach it to the Instance1
as Root Device.