After sudo reboot... my ssh just refuses connection

Hello community,

I have had this server running for the last 2 years and a bit with no problems… today I did some update/upgrades/dist-upgrades and after a sudo reboot, it won’t come back up… Nothing happens and it just refuses to connect. I tried to login to connect to the droplet via DO but I can’t do anything there either.

Any ideas?

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

Hi @cordellteam,

When you enter your droplet from DigitalOcean’s console, can you try and start your network. It’s possible something is interfering with it on boot. That’s going to be my best bet!

Additionally, when you try and SSH to your droplet does it show an error like

ssh: connect to host  ***.***.***.*** port 22: Connection refused.

Or is it completly unreachable. If it’s unreachable try the first method I described. If it gives an error like the above one, I’ll recommend the following

ssh -v [username]@[ipaddress] ....

ssh -vv [username]@[ipaddress] ....

ssh -vvv [username]@[ipaddress] ....

What this does, essentially, is increase the verbosity of what is output when attempting to connect via SSH. This will give you an idea of what’s going on during the back and forth exchange. Start with -v, then -vv and finally -vvv (as -vvv will throw about a page and a half of output at you).

You can also check /root/.ssh/knownhosts (on your local machine - if using Linux). You can clean that specific file out and then attempt to reconnect. It’ll ask you to confirm that you’d like to add the host you’re connecting to (to the knownhosts file). I’ve had plenty of instances which required this over the years as small changes (regeneration of server keys, for example), can invalidate your connection (though you’ll normally receive a message in such a case).

Beyond that, was a firewall active (i.e. iptables or UFW)? If so, and your IP wasn’t whitelisted, it’s possible your connection is being blocked. You should still be able to get in through console though.

Let me know how it goes

Regards, KFSys

Hi @cordellteam

I would try a “Power cycle” from the dashboard to reboot the droplet.

If after it boots, you still can’t connect from the DO console, then try to go to droplet’s page and click “Recovery” and try the “Boot from recovery ISO” option then turn off the droplet then back on and try the console again.