If you maintain an open SSH connection to the server,
Make sure the connection on the server has root privileges BEFORE a
problem
appears, since you can bet that sudo will also be broken at that
point.
It's not that sudo will be broken, it won't be, it's just that you
might be unable to exec or fork. And since sudo also requires
authentication, and that's what you're complaining is hosed...
Note: ssh sessions using keys will probably work just fine.