Question

Why SSH connect refused after restore from my snapshot?

  • Posted on October 27, 2014
  • cool4zblAsked by cool4zbl

After creating a droplet from my snapshot, I tried to ssh my host remotely, but I received: ssh: connect to host 128.199.153.217 port 22: Connection refused. I can use web console on DO, and I typed vim /etc/ssh/sshd_config, it showed listen port 22. I ran service ssh restart, it showed ssh start, but when I typed netstat -plutn , I can’t find port22 was listening by ssh. I can ping my server. I want to ssh remotely in my computer, so what can I do ? Please help me!

Show comments

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.

Alright, I’ve solve the problem by my own. I typed /usr/sbin/sshd, (not /etc/init.d/ssh start, it seemed didn’t work on me), and it showed that I had bad configurations ServerAliveInterval and ServerAliveCountMax in /etc/ssh/sshd_config. So I annotated two lines :

#ServerAliveInterval 30
#ServerAliveCountMax 5

And finally I run restart ssh, it displayed on terminal: ssh start/running , process 9794. It didn’t display process … when I had the problem.

This comment has been deleted