secure copy (remote file copy program) 



scp [-pqrvBCT346] [-F ssh_config] [-J destination] [-S program] [-P port] [-c cipher] [-i identity_file] [-o option] [-l limit] source [...] target


scp copies files between hosts on a network. It uses secsh for data transfer, and uses the same authentication and provides the same security as secsh. scp will ask for passwords or passphrases if they are needed for authentication.

The source and target may be specified as a local pathname, a remote host with optional path in the form [user@]host:[path] , or a URI in the form scp://[user@]host[:port][/path] . Local file names can be made explicit using absolute or relative pathnames to avoid scp treating file names containing : as host specifiers.

When copying between two remote hosts, if the URI format is used, a port may only be specified on the target if the -3 option is used.


Copies between two remote hosts are transferred through the local host. Without this option the data is copied directly between the two remote hosts. Note that this option disables the progress meter.


Forces scp to use IPv4 addresses only.


Forces scp to use IPv6 addresses only.


Selects batch mode (prevents asking for passwords or passphrases).

-c cypher 

Selects the cipher to use for encrypting the data transfer. This option is directly passed to secsh.

-i identity_file 

Selects the file from which the identity (private key) for RSA authentication is read. This option is directly passed to secsh.

-l limit 

Limits the used bandwith to a specified limit, given in Kbit/s.


Preserves modification times, access times, and modes from the original file.


Disables the progress meter.


Recursively copies entire directories.


Verbose mode. Causes scp and secsh to print debugging messages about their progress. This is helpful in debugging connection, authentication, and configuration problems.


Selects batch mode (prevents asking for passwords or passphrases).


Disables the progress meter.


Enables compression. Passes the -C flag to secsh to enable compression.

-F ssh_config 

Specifies an alternative per-user configuration file for secsh. This option is directly passed to secsh.

-J destination 

Connect to the target host by first making an scp connection to the jump host described by destination and then establishing a TCP forwarding to the ultimate destination from there. Multiple jump hops may be specified separated by comma characters. This is a shortcut to specify a ProxyJump configuration directive. This option is directly passed to secsh.

-P port 

Specifies the port to connect to on the remote host. Note that this option is written with a capital P, because -p is already reserved for preserving the times and modes of the file.

-S program 

Specifies the name of the program to use for the encrypted connection. The program must understand secsh options.


Disable strict filename checking. By default when copying files from a remote host to a local directory scp checks that the received filenames match those requested on the command-line to prevent the remote end from sending unexpected or unwanted files. Because of differences in how various operating systems and shells interpret filename wildcards, these checks may cause wanted files to be rejected. This option disables these checks at the expense of fully trusting that the server will not send unexpected filenames.

-o option 

Any valid -o option to secsh can be specified, and it is directly passed through when secsh is invoked. This is useful for specifying options for which there is no separate scp command-line flag. Fill details can be found in secsh.


Timo Rinne <> and Tatu Ylonen <>


scp is based on the rcp program in source code from the Regents of the University of California.


All UNIX systems. Windows 8.1. Windows Server 2012 R2. Windows 10. Windows Server 2016. Windows Server 2019. Windows 11. Windows Server 2022.


Secure copy only works when connecting to a machine that is running an OpenSSH derived secure shell service. The version of the scp utility is instead based upon the sftp protocol. When using machines running the version of the service, the sftp client is your only file transfer option.

The secure copy client does not handle wildcards. Multiple files must be copied individually.

The scp protocol is outdated, inflexible and not readily fixed. We recommend the use of more modern protocols like sftp and rsync for file transfer instead.


PTC MKS Toolkit for System Administrators
PTC MKS Toolkit for Developers
PTC MKS Toolkit for Interoperability
PTC MKS Toolkit for Professional Developers
PTC MKS Toolkit for Professional Developers 64-Bit Edition
PTC MKS Toolkit for Enterprise Developers
PTC MKS Toolkit for Enterprise Developers 64-Bit Edition


rcp, secsh, secsh-add, secsh-agent, secshd, secsh-keygen, sftp

PTC MKS Toolkit Connectivity Solutions Guide

PTC MKS Toolkit 10.4 Documentation Build 39.