secure copy (remote file copy program) 



scp [-pqrvBC12346] [-F ssh_config] [-S program] [-P port] [-c cipher] [-i identity_file] [-o option] [-l limit] [[user@]host1:]file1 [...] [[user@]host2:]file2


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. Unlike rcp, scp will ask for passwords or passphrases if they are needed for authentication.

Any file name may contain a host and user specification to indicate that the file is to be copied to/from that host. Copies between two remote hosts are permitted.


Forces scp to use protocol 1.


Forces scp to use protocol 2.


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.

-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 in rcp.

-S program 

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

-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. For example, forcing the use of protocol version 1 is specified using:

scp -oProtocol=1


Timo Rinne <> and Tatu Ylonen <>


scpis based on the rcp program in BSD source code from the Regents of the University of California.


All UNIX systems. Windows Vista. Windows 7. Windows Server 2008. Windows 8. Windows Server 2012. Windows 10.


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.


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 Enterprise Developers
PTC MKS Toolkit for Enterprise Developers 64-Bit Edition


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

MKS Toolkit Connectivity Solutions Guide

PTC MKS Toolkit 10.0 Documentation Build 6.