Report this

What is the reason for this report?

Can't connect to my droplet via terminal

Posted on July 12, 2018

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



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!

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.

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

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 !!

i am fed up from this to be honest :S

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.