Forum Discussion

Reprobus R's avatar
Reprobus R
Iron Contributor
Apr 29, 2025

Using SCP to copy a file from Linux to Windows

I'm having an issue with scp to copy a file from Linux to Windows. I log into my remote Linux system and by using this command to copy any file in this case to Windows although Windows stalls when attempting to copy ?

scp /home/ubuntu/myfile username@IP_of_windows_machine:/C:/Users/Anshul/Desktop

From this link; https://stackoverflow.com/a/49229019/22063662

4 Replies

  • GageWilder's avatar
    GageWilder
    Iron Contributor

    If you are not using WSL and just want a quick way, consider using WinSCP or copying files via SMB sharing.

  • Lucienw's avatar
    Lucienw
    Iron Contributor

    If setting up SSH on Windows seems complicated, alternative methods include:

    1. Using WinSCP (graphical, user-friendly)
    2. Using rsync over SSH (if you prefer command line)
    3. Sharing a network folder (SMB) and copying files directly
  • Wrentdr's avatar
    Wrentdr
    Iron Contributor

    This is the most critical part. Windows doesn't have an SSH server installed and enabled by default. You need to install and configure one. The most common way to do this is by installing the OpenSSH Server feature in Windows Settings. If you haven't done this, SCP will simply fail to connect or will stall because there's nothing listening on the SSH port (usually 22) on the Windows machine.

    • Reprobus R's avatar
      Reprobus R
      Iron Contributor

      OpenSSH is installed but I must install OpenSSH server as well ? And this is why it's stalling. 

Resources