text: Q:
  
  Cannot login after chmod o -rwx
  
  I have typed a recursive chmod o-rwx command from root in a linux via ssh. After that I can not login as root anymore. It is a huge problem now. Can I do anything to do to resolve this? I can only work via ssh, not locally.
  
  A:
  
  This isn't the answer you want to hear, but I'm afraid you've hosed that box.  If you can't ssh in now then you will need local hands-and-eyes to try to get some kind of access, and that will probably just be to save what data you can before you reinstall and restore the box from backups.
  You do have backups, don't you?
  Repermissioning an entire operating system without excellent backups isn't a trivial option even for experts, and doing it remotely is something I'd seriously quake at, even with 20+ years sysadminning under my belt.
  I think you have no real choice but to own up to whoever that you've hosed the box, and either get on a plane and go visit it for an extended period of nursing it back to life, or just count it lost and move on; probably whichever is cheapest.
  What you can do is learn from this:
  
  If your server matters to you, you need backups.  Preferably of the whole machine, but at least enough to restore the important bits.  Whatever your backup strategy, it needs to be tested, regularly, or it's not-fit-for-purpose; and by tested I mean "we performed a complete restore as if we'd lost the original box, and all the business systems on this pre-agreed list worked OK".
  Don't log in remotely as root.  It's insecure at the best of times, and encourages you to do everything as root whether root access is needed or not.  SSH in as yourself and use sudo appropriately.
  Think really hard before pressing <CR> on every command that's done with privilege.  As a sysadmin friend said many years back when his slow typing speed was criticised in his yearly appraisal, "I'm not paid to type fast, I'm paid to hit <ENTER> slowly and thoughtfully".
  
  It seems like the end of the world right now, but most of us have done something boneheaded like this at one point or another.  It's a test of character: if you can be honest with everyone else now, and honest with yourself going forwards so you learn from it, then it's not quite as bad a disaster as it seems to be today.
  
  