OK, I know this is dumb, but I locked myself out of my AWS EC2 instance by enabling UFW before I whitelisted the port 22 rule.
Luckily, I found this article which gives a full guide on how to successfully disable UFW in AWS’s instance startup script.
Leave a Reply