secure copy (remote file copy program)
1246BCpqrv] [-c cipher] [-F ssh_config] [-i identity_file] [-l limit] [-o ssh_option] [-P port] [-S program] [ [user@]host1:]file1 … [ [
scp Copies files between hosts on a network. It uses ssh(1) for data transfer, uses the same authentication, and provides the same security as ssh(1). Unlike rcp(1), scp will request passwords or passphrases if they are required for authentication.
File names can contain a user and host specification to indicate that the file is to be copied to/from that host. Local file names can be made explicit using absolute or relative path names to prevent scp from treating file names containing ‘:’ as host specifiers. Copies between two remote hosts are also allowed.
When copying a
source file to a destination file that already exists, scp will replace the contents of the destination file (keeping the inode).
If the destination file
does not already exist, an empty file is created with the name of the destination file and then populated with the contents of the source file. No attempt at “near-atomic” transfer is made using temporary files.
The options are as follows:
–1′ Forces scp to use protocol 1. -2‘ Forces scp to use protocol 2.
-4‘ Forces scp to use only IPv4 addresses.
-6‘ Forces scp to use only IPv6 addresses.
-B‘ Select batch mode (avoid asking for passwords or passphrases).
-C‘ Compression enablement. Pass the -C flag to ssh(1) to enable compression.
-c cipher Selects the encryption to be used to encrypt the data transfer. This option is passed directly to ssh(1).
-F ssh_config Specifies an alternate per-user configuration file for ssh. This option is passed directly to ssh(1).
-i identity_file Selects the file from which the identity (private key) is read for public key authentication. This option is passed directly to ssh(1).
-l limit Limits the bandwidth used, specified in Kbit/s.
-o ssh_option Can be used to pass options to ssh in the format used in ssh_config(5). This is useful for specifying options for which there is no separate scp command-line prompt. For details about the options listed below and their possible values, see ssh_config(5).
AddressFamily BatchMode BindAddress ChallengeResponseAuthentication CheckHostIP Cipher Ciphers Compression CompressionLevel ConnectionTries ConnectTimeout ControlMaster ControlPath GlobalKnownHostsFile GSSAPIAuthentication GSSAPIDelegateCredentials HashKnownHosts Host’ HostbasedAuthentication HostKeyAlgorithms HostKeyAlias HostName IdentityFile IdentitiesOnly KbdInteractiveDevices LogLevel NoHostAuthenticationForLocalhost NumberOfPasswordPrompts PasswordPort authentication’ preferredAuthentication protocol ProxyCommand PubkeyAuthentication RekeyLimit RhostsRSAAuthentication RSAAuthentication SendEnv ServerAliveInterval ServerCountMax SmartcardDevice StrictHostKeyChecking TCPKeepAlive UsePrivilegedPort UserKnownHostsFile VerifyHostKeyDNS
-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 to preserve file times and modes in rcp(1).
-p‘ Preserves modification times, access times, and modes of the original file
q‘ Silent mode: Disables the progress meter as well as ssh warning and diagnostic messages(1).
-r‘ Recursively copy entire directories. Note that scp follows the symbolic links found in the tree path.
-S program Name of the program to be used for the encrypted connection. The program should understand the ssh(1) options.
-v‘ Verbose mode. Causes scp and ssh(1) to print debug messages about their progress. This is useful for debugging connection, authentication, and configuration issues.
scp utility exits from 0 if successful and >0 if an error occurs. The
can be used anywhere the IPv4 address is. All entries must enclose the IPv6 address in square brackets. Note: Brackets are metacharacters for the shell and must have a shell escape.
rcp(1), sftp(1), ssh(1), ssh-add(1), ssh-agent(1),
ssh-keygen(1), ssh_config(5), sshd(8 ) History SCP is based on the rcp(1) program in BSD source code from the Regents of the University of California. Authors Timo Rinne <firstname.lastname@example.org> Tatu Ylonen <email@example.com> BSD April 14, 2013 BSD Referenced by amaddclient(8),
cpdup(1), darcs(1), gsissh(1), gsissh_config(5), gsisshd(8), htcp(1), mirrordir(1), openvpn(8), rbldnsd(8), rshdown(1), rssh(1), rssh.conf(5), scponly(8), ztelnet(1)