Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have a Linode virtual server that I made go down yesterday.
Basically, I killed sshd using

killall sshd

First time I issued this command, I forgot sudo so it just dropped my connection.
Next time, I issued

sudo killall sshd

and I couldn't connect anymore, as it said

ssh: connect to host <...> port 22: Connection refused

Now, I know that was stupid and obviously I have to restore it just as soon as possible.
I thought reboot would solve the problem, however after rebooting (from Linode dashboard) the server is not even pingable, let alone accepts SSH.

What happened and how do I solve it?
Obviously, I don't have root access now, however I can access file system of this machine from a different server, and I can reboot it at any time.

share|improve this question

3 Answers 3

up vote 3 down vote accepted

Use the Linode local console to login to your server on the console and work out what went wrong. I can't think of anything in particular in what you've described that would cause the symptoms you're describing, so the chances are something else you did is causing your problem now that you've rebooted.

share|improve this answer
    
Yeah, we're trying to log into Lish now. Thanks. –  Dan Jul 16 '11 at 9:02

Not pinging via IP address is wrong IP address, bad/stale route, firewall blockage. Not pinging via name is a DNS issue.

Check your network startup scripts.. If you cannot get to a console or login prompt, then use your filessytem access to disable most of the startup process and start re enabling/rewriting those parts that start the networking.

How to actually do that is very distribution specific.. bootup process really differentiates Linux distros.

If you can get a login then

sudo ifconfig -a
sudo route -n
sudo iptables -L

sudo /etc/init.d/rc.d/networking restart

all give interesting output

share|improve this answer

I have written some time ago an application called sshd-monitor to monitor that sshd is running and restart it if it doesn't. It is using expect to test the connectivity and a crontab entry to run it regularly.

I think you can still find it in the Mandriva or Mageia package repositories. For example, the source code can be downloaded from http://distrib-coffee.ipsl.jussieu.fr/pub/linux/MandrivaLinux/devel/cooker/SRPMS/main/release/sshd-monitor-0.3-9.src.rpm

share|improve this answer
    
Amazing, thanks. –  Dan Jul 17 '11 at 9:29

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.