scp-action: error copy file to dest: ***, error message: dial tcp *** i/o timeout

I have been using this actions in one of my projects. So far it works fine, but sometimes I get the following error:

tar all files into /tmp/979006019/KQmgptshHs.tar
scp file to server.
2021/03/19 12:52:01 error copy file to dest: ***, error message: dial tcp **.**.**.**:***: i/o timeout
drone-scp error:  error copy file to dest: ***, error message: dial tcp **.**.**.**:***: i/o timeout

About this issue

  • Original URL
  • State: open
  • Created 3 years ago
  • Reactions: 26
  • Comments: 22

Commits related to this issue

Most upvoted comments

As of now, you can use version 0.1.3

appleboy/scp-action@v0.1.3

instead

appleboy/scp-action@master

It’s working fine with me instead of master branch

Had the same issue.

My solution was to change the firewall rule(ufw) for my ssh port from LIMIT to ALLOW

@Pumpk1ns check with your cloud provider if the ssh port (22) is released for everyone to access, after I make these releases my pipeline ran successfully

As of now, you can use version 0.1.3

appleboy/scp-action@v0.1.3

instead

appleboy/scp-action@master

It’s working fine with me instead of master branch

Thankyou bro!

I think I was able to find a way around it.

Firstly: The default timeout for ssh to remote host is 30 seconds, you can try increasing it to probably 120 seconds. you can do this by simply defining the timeout input as 120 as shown below: Screenshot 2023-07-24 at 12 11 55 PM for more info on the possible inputs you can edit or change check https://github.com/appleboy/scp-action/blob/master/action.yml

That should work, well, hopefully it worked well for me.

I noticed an issue though, even though everything worked fine, somehow the ‘tar.gz’ files still remained. I did a simple work around in my yaml file as shown below: Screenshot 2023-07-24 at 12 16 49 PM

Please Note: I only did this after confirming that no other tar .gz files exist in my target directory.

I hope this helps.

Unfortunately, the same error.

UPD: when I had changed host and port without secrets - action was successful