Question

Can't connect to my droplet via terminal

Hello guys i’m not able to connect to my droplet via SSH , i can access it via the console in the dashboard, also i checked a online tool https://www.infobyip.com/sshservertest.php and found that the port 22 is closed, so i 'mt not able to connect to my droplet via ssh

Subscribe
Share

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.

I had a simillar issue, i later realized port 22 was closed, i enabled it with $sudo ufw allow 22
and it worked.

have a similar problem. Any advice?

i am fed up from this to be honest :S

any update please ?

here is the output of cat /etc/network/interfaces.d/50-cloud-init.cfg

#network config: disabled ( i tried to change ot to enabled and reboot but nothing change still no network) auto lo iface lo inet loopback dns-namesercers 67.207.67.2 67.207.67.3

auto eth0 iface eth0 inet static address <myip/20> gatway <gateway>

control-alias eth0

iface eth0 inet static address 10.16.0.5/16

output for ip addr / ip route

Example link

output of iptables -nvL: Example link

Also there is no network connection in the server when i opened it via console i tried to ping to google.com from the console but no response !!

Hello friend!

Is your droplet responding to ping? If so, it sounds like at least one of these things may be true:

  1. Your SSH port was changed from 22 to something else
  2. SSH is not listening
  3. The firewall on your droplet is blocking the SSH port

Depending on distro and version of OS, you may be able to type “netstat -tulpn” in console to see what services are listening, and you should see SSH on there. You can manage firewall with iptables (ex. https://www.digitalocean.com/community/tutorials/how-to-set-up-a-firewall-using-iptables-on-ubuntu-14-04 ). If SSH is not listening, you can restart it with one of these commands:

systemctl restart ssh service ssh restart

Kind Regards, Jarland