1scp(1)                           User Commands                          scp(1)
2
3
4

NAME

6       scp - secure copy (remote file copy program)
7

SYNOPSIS

9       scp [-pqrvBC46] [-F ssh_config] [-S program] [-P port]
10            [-c cipher] [-i identity_file] [-o ssh_option]
11            [ [user@]host1:]file1 []... [ [user@]host2:]file2
12
13

DESCRIPTION

15       The scp utility copies files between hosts on a network. It uses ssh(1)
16       for data transfer, and uses the same authentication  and  provides  the
17       same  security  as ssh(1). Unlike rcp(1), scp will ask for passwords or
18       passphrases if they are needed for authentication.
19
20
21       Any file name may contain a host and  user  specification  to  indicate
22       that  the  file  is  to be copied to/from that host. Copies between two
23       remote hosts are permitted.
24

OPTIONS

26       The following options are supported:
27
28       -4                  Forces scp to use IPv4 addresses only.
29
30
31       -6                  Forces scp to use IPv6 addresses only.
32
33
34       -B                  Selects batch mode. (Prevents asking for  passwords
35                           or passphrases.)
36
37
38       -c cipher           Selects  the  cipher to use for encrypting the data
39                           transfer. This option is directly passed to ssh(1).
40
41
42       -C                  Compression enable. Passes the -C flag to ssh(1) to
43                           enable compression.
44
45
46       -F ssh_config       Specifies  an  alternative  per-user  configuration
47                           file for ssh(1.).
48
49
50       -i identity_file    Selects the file from which the  identity  (private
51                           key) for RSA authentication is read. This option is
52                           directly passed to ssh(1).
53
54
55       -o ssh_option       The given option is directly passed to ssh(1).
56
57
58       -p                  Preserves modification  times,  access  times,  and
59                           modes from the original file.
60
61
62       -P port             Specifies  the  port  to  connect  to on the remote
63                           host. Notice that this option  is  written  with  a
64                           capital  `P',  because  -p  is already reserved for
65                           preserving the times  and  modes  of  the  file  in
66                           rcp(1).
67
68
69       -q                  Disables the progress meter.
70
71
72       -r                  Recursively copies entire directories.
73
74
75       -S program          Specifies  the  name  of the program to use for the
76                           encrypted connection. The program  must  understand
77                           ssh(1) options.
78
79
80       -v                  Verbose mode. Causes scp and ssh(1) to print debug‐
81                           ging messages about their progress. This is helpful
82                           in  debugging  connection, authentication, and con‐
83                           figuration problems.
84
85

OPERANDS

87       The following operands are supported:
88
89       host1, host2,...    The name(s) of the host from or to which  the  file
90                           is to be copied.
91
92
93       file1, file2,...    The file(s) to be copied.
94
95

EXIT STATUS

97       The following exit values are returned:
98
99       0    Successful completion.
100
101
102       1    An error occurred.
103
104

ATTRIBUTES

106       See attributes(5) for descriptions of the following attributes:
107
108
109
110
111       ┌─────────────────────────────┬─────────────────────────────┐
112       │      ATTRIBUTE TYPE         │      ATTRIBUTE VALUE        │
113       ├─────────────────────────────┼─────────────────────────────┤
114       │Availability                 │SUNWsshu                     │
115       ├─────────────────────────────┼─────────────────────────────┤
116       │Interface Stability          │Evolving                     │
117       └─────────────────────────────┴─────────────────────────────┘
118

SEE ALSO

120       rcp(1),  ssh(1),  ssh-add(1),  ssh-agent(1),  ssh-keygen(1),  sshd(1M),
121       ssh_config(4), attributes(5)
122

NOTES

124       Generally, use of scp with password or keyboard-interactive authentica‐
125       tion   method  and  two  remote  hosts does not work. It does work with
126       either the pubkey,  hostbased or  gssapi-keyex  authentication  method.
127       For  the  pubkey  authentication   method, either private keys not pro‐
128       tected by a passphrase, or an explicit ssh  agent forwarding have to be
129       used.  The  gssapi-keyex  authentication  method   works  with the ker‐
130       beros_v5 GSS-API mechanism, but only if  the  GSSAPIDelegateCredentials
131       option is enabled.
132
133
134
135SunOS 5.11                        22 Jun 2007                           scp(1)
Impressum