
402
|
Chapter 3: Linux Commands
This is the Title of the Book, eMatter Edition
Copyright © 2006 O’Reilly & Associates, Inc. All rights reserved.
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 speci-
fied 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.
-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 home directory:
$ scp user.server1.pub james@server2:/home/james/
screen ...