Name

scp

Synopsis

    scp [options] file1 [...]file2

Securely copy files between hosts on a network, using ssh. Part of the OpenSSH suite of network tools. (See also ssh and sftp.) scp requests a password or passphrase if required. The transfer can be between two remote hosts. If more than one file is specified for file1, file2 should be a directory; otherwise, only the last file in the list is copied. file1 and file2 can be specified in any of the following ways:

              file
              host:file
              user@host:file

Common Options

-4

Use IPv4 addresses.

-6

Use IPv6 addresses.

-B

Run in batch mode. Don’t ask for passwords or passphrases.

-c cipher

Specify the cipher to be used for encrypting the data.

-C

Enable ssh compression.

-F file

Use file as the per-user configuration file.

-i file

Specify the file that contains the identity (private key) for RSA authentication.

-o option

Specify an option to pass to ssh.

-p

Preserve modification time, access time, and mode.

-P port

Connect to port on the remote host.

-q

Don’t display the progress meter.

-r

Copy directories recursively.

-S program

Specify the program to use for the encrypted connection. The program must understand ssh options.

-v

Verbose mode.

GNU/Linux and Mac OS X Options

-1

Force use of the SSH1 protocol.

-2

Force use of the SSH2 protocol.

-l count

Limit the bandwidth used to count Kbits per second.

Mac OS X Option

-E

Preserve extended attributes, such as resource forks. Both ends of the connection must be running Mac OS X 10.4 or later.

Get Unix in a Nutshell, 4th Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.