Windows scp command

The Windows Server versions 2019 and later plus the latest builds of Windows 10 and Windows 11 include a built-in SSH server and client so it is not necessary to install WinSCP as there is a Windows scp command that may be used to transfer the files.

The scp command require SSH client to be enabled as described in Windows ssh command.

Enabling scp command

Windows Server 2019 and later

How to enable the scp command:

  1. Install the OpenSSH Client

  2. Open PowerShell as administrator.

  3. Run the following command:

    PowerShell
    Add-WindowsCapability -Online -Name OpenSSH.Client~~~~0.0.1.0

Windows 10 or 11

  1. To check if it is enabled, go to System - Optional features.

Using built-in scp command

  1. Enter "cmd' into the Search box and select "Run as administrator".

  1. In File Explorer navigate to the directory where you have the file(s) you want to copy to the device (C:\Temp and s2gw_config.xml in the example).

  1. Click into the path field on top, enter 'cmd' there and press Enter key. This will open the command window.

  1. Enter

Example

For S2GW with IP address 192.168.61.29 to transfer a file called s2gw_config.xml to a directory /home/pi/Documents use:

scp s2gw_config.xml [email protected]:/home/pi/Documents

  1. There will be a prompt for password for the pi user (rasp4icu).

  1. Enter the password.

  2. The file is copied.

Last updated