-2

I didn't know that Windows natively supports SCP (Secure Copy):

e.g. scp "C:\somefolder\somefile" someuser@192.168.1.1~/somefolder/somefile

Is there only this "client option" to copy files to other systems FROM the Windows machine or a "server/service option" as well to copy via scp TO the Windows machine (in Windows)?


Some lengthy further additions from the "original" question (not really relevant any more, but I leave them for people who are interested):

ONLY if Windows doesn't come with a native "SCP server", any experience with 3rd party light(!) weight SCP server in Windows would be appreciated. Preferable just as an executable to run without installation (portable) and little to no setup required (I know that this is a bold statement for a server application). UPDATE: there is a native SCP server (see here, thx to saaru for this link) but it's too "complicated" to set up, it's a workaround but still not the solution I'm looking for.

Note1: the goal is to be able to scp files from Linux systems to the Windows system and - if possible - without installing additional software to the Linux machine (like PSCP) - an installation on the Windows machine would be ok if there is no native support.

Note2: please don't suggest random SCP tools you find with a quick google search. I already did that myself, and tried a few of them but I didn't come across any which meet my requirements. Please only suggest them if you have experience using them and if they meet all the requirements.

Note3: In my(!) opinion, this is NOT a duplicate of "How to SCP from Linux server to Windows client", here's why:

  • Although it's similar in general, it does not have my specifications (SCP optional, native optional, simple&fast setup optional). The answers also don't meet my question's requirements (only one shows a solution which is native software but it's still quite "complicated" to set up). I admit it's a good "goto" if no solution exists but still - not the essence of my question... Therefore, in my opinion, this is NOT a duplicate post - please leave a comment if you think I'm wrong - thank you.

  • UPDATE: thanks to Ramhound for pointing out that Tingfeng's and Ryan's answer essentially are similar to my answer - they are actually the same. In regards to the "duplicate question" issue, although they are the same answer, they don't make it a duplicate question: same answers can have different questions. (Also, I think the two answers get lost in the crowd and don't focus enough on their advantage - the ones I'm looking for. In fact this might be the reason why the question has "duplicate answers"). As a starting point about what constitutes a duplicate I used this page and especially this referenced page.

Note: Writing this question, I assumed the target host needs to have a running SCP server, but this is not the case, therefore the answer is simple (see answer).

Albin
  • 9,307
  • 11
  • 50
  • 89
  • 2
    Does this answer your question? [How to SCP from Linux server to Windows client](https://superuser.com/questions/414803/how-to-scp-from-linux-server-to-windows-client) Especially this answer: https://superuser.com/a/1437891/141595 – Saaru Lindestøkke Aug 16 '21 at 10:19
  • @Albin - Except this is a duplicate, your answer is essentially, a duplicate answer of several hours from the duplicate. I made the mistake of voting to close this question, then reading one of your notes, only to realize after voting to reopen the question it was indeed a duplicate (IMO). – Ramhound Aug 16 '21 at 13:54
  • 1
    I guess @Ramhound is referring to [this answer](https://superuser.com/a/1558006/141595) from the duplicate question. – Saaru Lindestøkke Aug 16 '21 at 14:05
  • @Albin - The answer(s) from Tingfeng Liu, Ryan Loggerythm, and Chris Halcrow, and Ishmael. – Ramhound Aug 16 '21 at 14:07
  • 1
    @Albin, I've deleted my comment about the software recommendation as you indicated that's not what you're looking for. However, it *really* is a duplicate, so that comment I'll leave here (not sure why the close votes were removed). That this is a duplicate is further demonstrated by you finding a workable answer which is more or less verbatim posted on the duplicate question as well. – Saaru Lindestøkke Aug 16 '21 at 14:10
  • @Ramhound Chris's answer requires WSL (major setup - goes against my requirements), same thing for Ishmael's answer. Tingfeng's and Ryan's answer do essentially the same thing I'm doing, you are correct there. Still I don't think that considers a duplicate (see my updated reasons in Note3). – Albin Aug 16 '21 at 14:21
  • @SaaruLindestøkke see my previous answer to Ramhound in regards to the evaluation if this constitutes a "dublicate question" – Albin Aug 16 '21 at 14:22
  • @Albin - **The answers I mention only use scp commands** A question becomes a duplicate of an existing answer, when the answers it received, actually answer your question. Duplicate flags have everything to do with finding existing answers, as not to repeat the same information, in multiple places and point new users to those existing answers through duplicate questions. – Ramhound Aug 16 '21 at 14:51
  • @SaaruLindestøkke - Close votes were removed when I made the mistake of casting my own close vote, realizing it might not be a duplicate and reopening the question, and only then realizing it was a duplicate. I typically ignore "this isn't a duplicate commentary" in question bodies should have done it this time, especially, when they take the form of meta-commentary. – Ramhound Aug 16 '21 at 14:56
  • @Ramhound to tell you the truth, I'm conflicted. On one side I see (and agree with) your points on the other side, I think a (more) specific subset of a question (thus a more specific subset of answers) is reason enough to make a question NOT a duplicate. Otherwise (I'm over exaggerating here of course - it's just to show the principle) I could make one very general question add all existing answer and mark all other question as a duplicate - this works both ways of course. I have to think about it, maybe this would be a better topic for meta? – Albin Aug 16 '21 at 15:08
  • @Ramhound do you know this post [Dr. Strangedupe: Or, How I Learned to Stop Worrying And Love Duplication](https://stackoverflow.blog/2010/11/16/dr-strangedupe-or-how-i-learned-to-stop-worrying-and-love-duplication/?_ga=2.233425502.1189672127.1629108032-1428520738.1563262521)? – Albin Aug 16 '21 at 15:09
  • I think this all boils down to a lack of prior research. If you would've done a websearch for e.g. "how to scp from linux to windows" (as that is your final goal) you would've found a dozen answers on how to achieve this. Then you could start filtering on your second condition (i.e. "no software install") and you would find the command you posted as an answer. I helped you with the first part, but for some reason (unclear to me) you posted multiple edits to show why this is not a duplicate instead of scrolling through 8 answers on the duplicate post and finding how to solve your problem. – Saaru Lindestøkke Aug 16 '21 at 15:15
  • @SaaruLindestøkke I didn't only made several edits but also several comments about why it's not a dublicate. In fact this **whole discussion** is about the issue if the question constitutes a duplicate or not. Note: I answered my own question a looong time ago (through research by the way ;) - long before Ramhound's post. That's why I suggested to continue this in meta and not here. None the less, thanks for your participation. – Albin Aug 16 '21 at 15:55

1 Answers1

1

The file transfer FROM Linux TO Windows can simply be initiated ON the Windows machine:

scp [REMOTE_SOURCE_PATH_LINUX_MACHINE] [LOCAL_TARGET_PATH_WIN_MACHINE]

e.g. scp someuser@192.168.1.1~/somefolder/somefile "C:\somefolder\somefile"

Works like a charm! Without any additional installation!

Albin
  • 9,307
  • 11
  • 50
  • 89