Cannot connect to droplet via SSH from ma

Help! Suddenly not able to connect to droplet via SSH. This after editing ssh_config to add a Host * and ServerAliveInterval 120 to keep node and java running. Now I get these: macMini:~ macuser$ ssh -vvv root@x.243.212.x OpenSSH6.9p1, LibreSSL 2.1.8 debug1: Reading configuration data /etc/ssh/sshconfig debug1: /etc/ssh/sshconfig line 20: Applying options for * debug1: /etc/ssh/sshconfig line 102: Applying options for * debug2: sshconnect: needpriv 0 debug1: Connecting to x.243.212.x [x.243.212.x] port 22. debug1: connect to address x.243.212.x port 22: Connection refused ssh: connect to host x.243.212.x port 22: Connection refused* I tried dpkg-reconfigure openssh-server - didn’t work. DB port 3306 still works


Fixed. The lines Host * and ServerAliveInterval 120 caused the problem. Removed and back up running!

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

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.

Login via your DO control panel, edit /etc/ssh/sshd_config, and remove the parameter “ServerAliveInterval 120”, save and then restart the server:

systemctl restart sshd


service sshd restart

Good luck.