Cannot connect to droplet via SSH from ma

Posted June 21, 2016 1.9k views
Ubuntu Linux Commands

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

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.

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.

Submit an Answer