SCP2(1)

NAME
scp2 - secure copy client

SYNOPSIS
scp2 [-D debug_level_spec ] [-d ] [-p ] [-u ] [--verbose ] [-v ] [--help ] [-h ] [-c cipher ] [-S ssh2-path ] [-P ssh2-port ] [-t ] [-f ] [-1 ] [-4 ] [-6 ] [-r ] [-B ] [-b buffer_size ] [-N max_requests ] [-a[arg] ] [-q ] [-Q ] [--statistics [yes|no|simple] ] [--interactive ] [-I ] [--overwrite ] [--version ] [-V ] [-o ssh2-options ] [-i file ] [[user@]host[#port]:]file ... [[user@]host[#port]:]file_or_dir

DESCRIPTION

Scp2 (Secure Copy) is used to copy files over the network securely. It uses ssh2 for data transfer and authentication, and provides the same level of security as ssh2. Unlike rcp, scp2 will ask for passwords or passphrases if they are needed for authentication. You can also use your public key for authentication. See ssh-agent2(1) and ssh-add2(1). Any filename may contain a host, user, and port specification to indicate that the file is to be copied to/from that host. Copies between two remote hosts are permitted. The 'host' parameter can optionally be enclosed in square brackets ([]) to allow the use of semicolons (read: IPv6 addresses). 'file' can contain globbing patterns (type zsh_fileglob). All special characters can be escaped to include them in 'file', but this means that if you want to use escapes so that they will be used in the glob pattern (to escape special characters), you have to escape them ('\\'). Read more about zsh_fileglob from sshregex(1).

OPTIONS

-D debug_level_spec
    Print extensive debug information to stderr. debug_level_spec is a number between 0 and 99, where 99 specifies that all debug information should be displayed.

-d  With this option, scp2 will make sure that the destination file is a directory. If not, scp2 will exit with an error message.

-p  Tells scp2 to preserve file attributes and timestamps.

-u  Makes scp2 remove source files after copying. This makes scp2 work more like "mv" than "cp."

-v,--verbose
    Makes scp2 verbose. This is equal to specifying the'-D 2'-option.

-h,--help
    Display a short help.

-c cipher
    Select the encryption algorithm that ssh2 will use. Multiple -c options are allowed. A single -c flag can have only one cipher.

-S ssh2-path
    Specifies the path to ssh2 used in connecting.

-o ssh2-options
    Specifies options to give to ssh2. Use as with ssh2, see ssh2(1).

-i file
    Specifies the identity file to give to ssh2.

-P ssh2-port
    Specifies the remote port to ssh2. Ports can also be defined on a file-to-file basis. See SYNOPSIS.

-t or -f
    Compatibility mode. Invoke scp1 with the given command line to handle the connection. scp1 must be in the path.

-1  Invoke scp1 with the rest of the given command line. This argument must be the first on the command line and separate from all other one-character arguments. It must not be used when -t or -f are used.

-4  Instruct ssh2 to use IPv4.

-6  Instruct ssh2 to use IPv6.

-r  Copy directories recursively. Does not follow symbolic links.

-B  Invoke ssh2 in batch mode.

-b buffer_size
    Define the maximum buffer size for one request (default 32768 bytes).

-N max_requests
    Define the maximum number of concurrent requests (default 10).

-a[arg]
    Transfer files using ascii mode, i.e. newlines will be converted on the fly. See command ascii in sftp2(1). If the server doesn't advertise the newline convention, you can give it a hint by giving an argument "-a". Default is to set destination newline convention, but you can specify either by prefixing the argument with "src:" or "dest:" for source or destination convention, respectively. Advanced example: "scp -asrc:unix -adest:dos src_host:src_file dest_host:dest_file".

-q  Quiet mode (only fatal errors are reported).

-Q  Do not show process indicator.

-V,--version
    Display version.

-I,--interactive
    Prompt whether to overwrite an existing destination file. (doesn't work with `-B' (batch-mode))

--overwrite
    Whether to overwrite existing destination file(s). Default is "yes". Takes optional argument, with which you can disable overwriting.

--statistics [yes|no|simple]
    Takes mandatory argument, with which you can choose statistics style. Default is "yes", or full-blown statistics, which fit to screen width. Other possibilities are "no", to disable statistics (analogous to "-Q" option), and "simple", which is the default reporting style when there is no tty (e.g. in cron jobs).

EXIT VALUE

0   Operation was successful.
1, 2
    Operation resulted in an undetermined error within sshfilecopy.
3   Destination is not directory, but it should be.
4   Connecting to host failed.
5   Connection lost for some reason.
6   File does not exist.
7   No permission to access file.
8   Undetermined error from sshfilexfer.
9   File transfer protocol mismatch.

EXAMPLES

Copy files from your local system to a remote system:

$ scp localfile user@remotehost:/dest/dir/for/file/

Copy files from a remote system to your local disk:

$ scp user@remotehost:/dir/for/file/remotefile /dest/dir/for/file

INSTALLATION

Scp2 uses ssh2 in network connections. Therefore it is not installed suid-root. Notice that the subsystem 'sftp-server' must be defined in the sshd2(8) configuration file in the remote end for scp2 to work.

AUTHORS

SSH Communications Security Corp. For more information, see http://www.ssh.com.

SEE ALSO
ssh2(1), sshd2(8), ssh-keygen2(1), ssh-agent2(1), ssh-add2(1), sftp(1) rlogin(1), rsh(1), telnet(1)