Options
- -3
- 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: This option disables the progress meter.
- -4
- Forces scp to use IPv4 addresses only. If both -4 and -6 are specified, scp uses the option that appears last on the command line.
- -6
- Forces scp to use IPv6 addresses only. If both -4 and -6 are specified, scp uses the option that appears last on the command line.
- -B
- Selects batch mode; while in batch mode, prompts are not issued for passwords, password phrases, or passphrases, but they are still required for OpenSSH. To avoid password prompts, use public-key authentication with an ssh-agent or host-based authentication.
- -c cipher
- Selects the cipher to use for encrypting the data transfer. This option is directly passed to ssh. For more information, see the ssh -c option or the ssh_config keyword Ciphers.
- -C
- Enables compression. Passes the -C flag to ssh to enable compression.
- -F ssh_config
- Specifies an alternative per-user configuration file for ssh. This option is directly passed to ssh. This option has no effect on the z/OS®-specific configuration files.
- -i identity_file
- Selects the file from which the identity (private key) for RSA, DSA, or ECDSA authentication is read. This option is directly passed to ssh. For more information, see ssh.
- -l
- Limits the used bandwidth, which is specified in Kbits.
- -o ssh_option
- Can be used to pass options to ssh in
the format used in the ssh_config configuration
file. This option is useful for specifying options for which there
is no separate scp command-line flag. For
full details of the available options and their values, see ssh_config. The z/OS-specific per-user OpenSSH
client configuration options (see zos_user_ssh_config)
can be specified on -o, but the z/OS-specific system-wide options
(see zos_ssh_config)
cannot.
For example:
- To set StrictHostKeyChecking option:
scp -oStrictHostKeyChecking=no - To disable password authentication:
scp -oPasswordAuthentication=no
- To set StrictHostKeyChecking option:
- -p
- Preserves modification times, access times, and modes from the original file.
- -P port
- Specifies the port to connect to on the remote host.
- -q
- Quiet. Disables the progress meter as well as the warning and diagnostic messages from ssh.
- -r
- Recursively copies entire directories. Note: scp follows symbolic links that are encountered in the tree traversal.
- -S program
- Name of program to use for the encrypted connection. The program must understand ssh options. On z/OS, if this option is specified, then scp will hang unless the program provides SMF information.
- -T
- 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.
- -v
- Verbose mode. Causes scp and ssh to print debugging messages about their progress, which is helpful in debugging connection, authentication, and configuration problems.