I followed the common practice to only allow public key login with SSH into Debian, then somehow I accidentally changed the permission of ~/.ssh/ folder (I think it got owned by root), after that openSSH refused to log me in! (and server was in a different country, with no remote/KVM console)
I find this setup quite fragile. Is there a way to prevent this, and maybe just give me a warning on next login?
If there is no solution then I will have to setup a strong login password as a backup, no matter what everyone else says.
Found similar lockout question but iptable/configuration change was the root cause: Prevent being locked out when configuring SSH and iptables I didn't change the configuration so I wasn't expecting a lockout.