Skip to Content
Linux in a Nutshell, 6th Edition
book

Linux in a Nutshell, 6th Edition

by Ellen Siever, Stephen Figgins, Robert Love, Arnold Robbins
September 2009
Beginner
942 pages
85h 34m
English
O'Reilly Media, Inc.
Content preview from Linux in a Nutshell, 6th Edition

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

The first format is used for a local file; a remote file can be specified in either of the other two formats.

Options

−1

Force the use of SSH protocol 1.

−2

Force the use of SSH protocol 2

−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 config

Specify an ssh user configuration file (default is $HOME/.ssh/config).

-i file

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

-l limit

Limit bandwidth used to limit, specified in kilobits/second.

-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 or messages.

-r

Copy directories recursively.

-S program

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

-v

Verbose mode.

Example

Copy the local file user.server1.pub to the remote system server2, putting it in james’s ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Unix in a Nutshell, 4th Edition

Unix in a Nutshell, 4th Edition

Arnold Robbins
Linux Under the Hood

Linux Under the Hood

Sander van Vugt
Linux Kernel in a Nutshell

Linux Kernel in a Nutshell

Greg Kroah-Hartman

Publisher Resources

ISBN: 9780596806088Errata Page