DigitalOcean Droplet SSH Connection Refused or Timed Out
Quick answer
Connection refused means nothing is listening on the port (sshd stopped or on another port); timed out means a firewall or network is dropping packets. Check the Droplet status, firewalls and sshd through the Recovery Console.
Most likely fix: Rule out the basics
How to fix it
Try these in order — the most common fix is first.
1. Rule out the basics
- Check status.digitalocean.com for your region
- Check your email for "Networking Disabled: <droplet name>" or an open support ticket
- Confirm the IP address of the Droplet in the Control Panel
- Try another SSH server from the same network to rule out a blocked port 22
Did this fix it?2. Inspect sshd from the Recovery Console
- Open the Droplet > Settings > Recovery console > Launch Console and log in as root
- Run systemctl status ssh (Ubuntu/Debian) or systemctl status sshd (CentOS/Fedora); start it with systemctl start ssh
- Run grep Port /etc/ssh/sshd_config and sudo ss -plnt to confirm sshd listens on the expected port and on 0.0.0.0, not 127.0.0.1
- Check the ListenAddress directive is commented out or set to the public IP
Did this fix it?3. Check firewalls
- On the Droplet: sudo ufw status, sudo iptables -nL or sudo firewall-cmd --list-services; make sure the SSH port is allowed
- In the Control Panel open Networking > Firewalls and check inbound rules for the Droplet; if you restrict by source IP, update it after your ISP changes your address
Did this fix it?4. Snapshot and reboot
- Take a snapshot first
- Run sudo reboot from the console, or use Power cycle in the Control Panel, then retry
Did this fix it?
Symptoms
ssh: connect to host IP port 22: Connection refused, or Connection timed out.
Why it happens
- sshd is stopped or crashed (often after running out of memory)
- sshd listens on a different port or only on 127.0.0.1
- UFW, iptables or firewalld blocks the SSH port
- A Cloud Firewall attached to the Droplet has no inbound rule for SSH, or your IP changed
- Your own network blocks port 22
- Droplet was disabled by DigitalOcean (abuse flag) or the region has an outage
This guide also covers
- digitalocean ssh connection refused
- droplet ssh connection timed out
- digitalocean droplet not reachable
- cannot ssh into droplet
Still not working?
If DigitalOcean keeps failing, you're not alone. See every DigitalOcean problem users report or the alternatives people switch to.
Have an app idea? Our small team builds any software: web and mobile apps, games, desktop, AI tools. Price agreed together.
Talk to usThe same problem in other apps
Other DigitalOcean errors
- DigitalOcean Droplet SSH Permission Denied (publickey)
- DigitalOcean Droplet 502 Bad Gateway (Nginx)
- DigitalOcean Droplet Out of Memory (OOM Killer)
- DigitalOcean App Platform Build Failed
- DigitalOcean App Platform Deploy Failed or 502 After Deploy
- DigitalOcean Account Locked or Verification Required
- DigitalOcean Unexpected Bill: Charged for Deleted or Powered-Off Droplets
- DigitalOcean Droplet Locked Out: Reset Root Password and Recovery Console