Unable to login via SSH or Console

blitzer

Verified User
Joined
May 12, 2009
Messages
35
Hi Guys,

Ran out of ideas so no choice but to post here.
I am running CentOS 5 with DirectAdmin.

Was installing Tomcat last night and today i suddenly couldnt login via ssh.
It will show the login prompt and after the password portion, it will show my last login and after awhile, it will just close

I went down physically to the server to try and login via console but it didnt work as well. Created a new user to try (via single user mode) and it didnt work either. Checked my PAM configs, nothing unusual.. checked my /var/log/messages, nothing unusual.. checked my /var/log/secure and saw nothing unusual just that my connection opened and closed.

any ideas?
 
What about output from dmesg command.

If there is a problem it should be in /var/log/messages or dmesg
 
Nothing in /var/log/messages
havent tried dmesg though.. will need to go down to the server to check.

What about output from dmesg command.

If there is a problem it should be in /var/log/messages or dmesg
 
Did you get anywhere with this? I have the exact same problem. I also tried to install tomcat last night and after a restart, no SSH.

I have KVM access and I can only get logged in using "emergency" mode - for some reason single user mode isn't working.

Now that I'm in though, I'm not quite sure where to start. Is there any way to repair the bash binary?
 
If your problem is truly with bash, just reinstall it. How you do that differs based on your OS Distribution.

Jeff
 
Hi Jeff,

Thanks for your reply. I'm pretty sure it is bash but is there anyway I can re-install this from DirectAdmin?

I'm on CentOS so I should just be "yum reinstall bash" but as I can only get in using KVM and emergency mode I don't have network access. Is there a way to bring up the network in emergency mode? To be honest I've never had to use emergency mode before so I don't know a whole lot about what I can /cannot do, it took me long enough to work out that I could re-mount the fs as r/w.
 
Scrub that, I decided the easiest way to run the reinstall was by adding the command to rc/local to run after init. That actually worked but reinstalling bash didn't fix my problem. It must be something else.

If anyone has any ideas, please feel free to jump in.
 
Blitzer, just in case you didn't get it, don't do what I did and start chasing your tail looking for the problem without checking the obvious first.

I logged into rescue mode and removed all the tomcat stuff and any changes I made to httpd.conf etc and I got back in.

I know, I know, newB mistake! Will I ever learn?... probably not!
 
It's likely the problem, then, is not with bash (Notice I said if.

You shouldn't be running the reinstall automatically each time you start your computer.

You can, if you wish, set yum to automatically check daily and update anything for which there's a new update.

Jeff
 
Back
Top