File transfer using SCP from docker to remote host

Need to transfer a file using SCP in concourse to remote server using docker image
please suggest the best image for transfer of files using SCP.

you should try the forum search, maybee you find something.
At least using it ones wouldn’t have hurt, would it?

Good luck!

What an exceptionally unhelpful response.
I came here from a google search and have no idea where to even begin with a vague command like “maybee you find something” if I search this unfamiliar website. Where is this search? If you have nothing useful to contribute, say nothing at risk of becoming the fool you appear to be.

Yes, I am resurrecting this topic on principle because it’s important to call people out when they could be less unhelpful and, y’know, actually offer guidance when it’s sought.

Do better.

Edit: for the record:

Next time, offer some actual advice.

I can see how this might appear like this…My motivation for this response was that this user joined animmediatly opened the thread without reading any other posts first.

A follow up post of the user could have been “I can find anything” which might have sparked a conversation.

Btw. I would have only used the search term “scp”. I tend to reduce the number of keyword if the specifc seaach doesn’t help.

2 Likes

I think we could all do better at times. For my part, here’s a workable solution (in my case) that I used with rsync to get files from a to b:

rsync -avW -e ssh /source/mystuff user@remote.host:/target/

IIRC, rsync will clone the siurce directory into the target directory, so the /source>>/mystuff<< directory will be placed INTO /target/ and result in the final path “/target/mystuff”, which is ideal for me, but something you should be aware of because similar commands can work counterintuitively in this regard.

rsync should non-destructively clone the data from source to target (i had to add ssh auth between two remote servers, in my use-case, so ymmv on any auth specifics the docker source).

It also has the benefit of being resumable; if the transfer is interrupted, it’ll pick up where it left off and ignore any files that are already identical. Then, when finished, if you no longer need them, you can safely delete the source files.

Finally, I realise the answer here is a little beyond the scope of the original question, but it’s certainly relevant nontheless and others may find this helpful in another 12 months :wink:

nb. please correct me anywhere here if necessary: I am flying by the seat of my pants and have no foundational understanding of networking.