oreilly.comSafari Books Online.Conferences.


Linux in a Nutshell

This directory of Linux commands is from Linux in a Nutshell, 5th Edition.

Click on any of the 687 commands below to get a description and list of available options. All links in the command summaries point to the online version of the book on Safari Bookshelf.

Buy it now, or read it online on Safari Bookshelf.


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.



Force the use of SSH protocol 1.


Force the use of SSH protocol 2


Use IPv4 addresses.


Use IPv6 addresses.


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

-c cipher

Specify the cipher to be used for encrypting the data.


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.


Preserve modification time, access time, and mode.

-P port

Connect to port on the remote host.


Don't display the progress meter.


Copy directories recursively.

-S program

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


Verbose mode.


Copy the local file to the remote system server2, putting it in james's home directory:

$ scp james@server2:/home/james/

Linux Resources
  • Linux Online
  • The Linux FAQ
  • Linux Kernel Archives
  • Kernel Traffic

  • Sponsored by: