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.


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.


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


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


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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