how to copy a file from linux to windows with scp command?

48,902

Solution 1

No! You can't use "scp" command to copy date remotely from Linux box to Windows box. You need to install "WinScp" utility on windows machine and then transfer the data from Linux box to windows box.

You can download WinScp from : https://winscp.net/eng/download.php

Solution 2

Why not just add MyDocuments as a shared folder with your VM? That would simplify things a lot.

Regardless, you need something like WinSCP on your Windows box or else there's nothing to really ssh to.

Share:
48,902

Related videos on Youtube

user46745
Author by

user46745

Updated on September 17, 2022

Comments

  • user46745
    user46745 almost 2 years

    I would like copy a backup file from image vmware linux to windows but I don't know how to process it?

    I tried:

    scp /source/backup.tar.gz [email protected]:/c:\ProgrammefilesC:\Documentsand Settings\Admin\MyDocuments
    

    but error and I know that it's not like that, so if you have solutions?

    • Admin
      Admin almost 14 years
      You need a SSH server on the Windows box for this to work. The most easy way would probably be to do the reverse: Install (start/unblock port) the SSH server on the Linux machine and transfer the file with a Windows client like Putty.
    • karlphillip
      karlphillip almost 14 years
      This would be a great question for superuser.
  • Douglas Leeder
    Douglas Leeder almost 14 years
    scp needs to talk to an ssh server on the remote end.
  • user46745
    user46745 almost 14 years
    Yes think you, if i want that it be include in my script who will be execute automatically ??? Because i have my script ".sh" who make a backup and compress this backup and at the end of my script i would to copy this compress file to a windows folder. I think with the scp command.
  • ChrisInEdmonton
    ChrisInEdmonton over 10 years
    Curious, why would you do it this way instead of using scp? If you can install ssh in cygwin, you could also install scp.
  • naisanza
    naisanza over 10 years
    Using this way is more interesting and fun to me haha. It primarily stemmed from using nc and transferring files between two servers. And also using bash socket programming to transfer files as well. Then, I wanted to do it more securely. Rather than hashing and salting the stream before sending it over nc or bash, SSH just seemed easier, since every linux server has SSH pretty much by default. So, I use SSH over SCP because it's more fun to me.