Got locked out of a Linux VM, how can I restore SSH and console access?
Posted on 2011-09-07
While using a routine connection WinSCP connection to a Linux VM (CentOS 4.0), I have a suspicion that I may have tripped some bad password counter when trying to save a file and now ALL SSH connections are being actively refused by the Linux VM. I have VM console access to this VM (older version, VM 1.0) but every console login I attempt (including root) just flashes a PAM error and refuses access. I also have access to the Linux server underlying the Linux VM running so I can also stop/start the VM by vmware-cmd utility. I just cannot access the VM itself. If this is a situation where ipchains/iptables has locked me out of the VM, is there anyway I can reset this externally? This is quite frustrating and, I know, a boneheaded situation to be in but I need to be very careful to not bork the VM any further than I already have because I have apps and users that I cannot disrupt too much. Maybe I have been rooted somehow, but since all the apps are running fine, I am hoping that there is no foul play involved here. I have searched for instances of similar VM lockouts but have not found any that sound like the ugly mess I have gotten into. I hope someone out there has maybe run into this before and can help because the situation is getting urgent for access to code and DB on the VM. I am also wondering if the vmware-cmd setrunuser command may be of any use in this situation but I am reluctant to try this until I am more sure what side-effect this has or if it even has any chance of working.
Any help that anyone can bring to this siutation would be deeply appreciated.