Unable to login to remote server via ssh

A funny thing happened to one of my Red Hat 5 Enterprise servers after applying the errata. I rebooted the servers as usual after applying the updates, and they came up just fine. But unfortunately I was not able to logon remotely via ssh to a server. I tried various different accounts including root, but none of them worked.

It seems that I was able to login successfully into the server, but within few seconds it would kick me out. Just before it disconnected my ssh session, I saw the message ‘The server is going down..’. For some strange reason that message was stuck in the operating system, it was the message displayed just before the scheduled reboot. I had pushed out the reboot command from the Red Hat Satellite server. All the other servers rebooted fine.

I knew that clearing this message would resolve my dilemma, but I had no idea which file held it. After much searching I found the culprit, it was /etc/nologin. Due to reason I did not want to try and figure out as it would take too much time, this file did not get automatically deleted after the reboot. I deleted /etc/nologin, and then was able to successfully login via ssh to the server.

About Andrew Lin

Hi,
I have always wanted to creat a blog site but never had the time. I have been working in Information Technology for over 15 years. I specialize mainly in networks and server technologies and dabble a little with the programming aspects.

Andrew Lin

View all posts by Andrew Lin →

Leave a Reply

Your email address will not be published. Required fields are marked *