Report this

What is the reason for this report?

How to set automation (CI-CD)

Posted on March 10, 2025

scp file to server.

2025/03/10 09:38:58 error copy file to dest: ***, error message: dial tcp ***:22: connect: connection timed out
drone-scp error:  error copy file to dest: ***, error message: dial tcp ***:22: connect: connection timed out


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.

Hey @nashurgessa,

That error usually means your CI server can’t reach your Droplet over SSH (port 22). A few quick things to check:

  • Double-check the IP address — make sure it’s correct.
  • Make sure SSH is running on the Droplet: sudo systemctl status ssh
  • Check that port 22 is open — if you’re using DigitalOcean Cloud Firewalls or ufw, allow SSH access.
  • If you’re using a CI/CD provider like Drone, make sure your Droplet allows connections from their IPs — some providers use dynamic IP ranges, so you may need to allow a wider range.

Let me know which CI you’re using and I’ll help you tweak the config.

- Bobby

Heya,

The error you’ve provided /03/10 09:38:58 error copy file to dest: ***, error message: dial tcp ***:22: connect: connection timed out means your CI server can’t connect to your desired destionation, probably your Droplet because it doesn’t have access on port 22.

Make sure yo allow connections between the two to be able to deploy your desired application.

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.