Cannot connect to droplet via SSH from ma

June 21, 2016 1.6k views
Linux Commands Ubuntu

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

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

1 Answer

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.

Have another answer? Share your knowledge.