<s>
Secure	B-Protocol
copy	I-Protocol
protocol	I-Protocol
(	O
SCP	O
)	O
is	O
a	O
means	O
of	O
securely	O
transferring	O
computer	B-Operating_System
files	I-Operating_System
between	O
a	O
local	O
host	B-Application
and	O
a	O
remote	O
host	B-Application
or	O
between	O
two	O
remote	O
hosts	O
.	O
</s>
<s>
It	O
is	O
based	O
on	O
the	O
Secure	B-Protocol
Shell	I-Protocol
(	O
SSH	B-Protocol
)	O
protocol	O
.	O
</s>
<s>
"	O
SCP	O
"	O
commonly	O
refers	O
to	O
both	O
the	O
Secure	B-Protocol
Copy	I-Protocol
Protocol	I-Protocol
and	O
the	O
program	O
itself	O
.	O
</s>
<s>
According	O
to	O
OpenSSH	B-Language
developers	O
in	O
April	O
2019	O
,	O
SCP	O
is	O
outdated	O
,	O
inflexible	O
and	O
not	O
readily	O
fixed	O
;	O
they	O
recommend	O
the	O
use	O
of	O
more	O
modern	O
protocols	O
like	O
SFTP	B-Protocol
and	O
rsync	B-Application
for	O
file	B-Protocol
transfer	I-Protocol
.	O
</s>
<s>
As	O
of	O
OpenSSH	B-Language
version	O
9.0	O
,	O
scp	O
client	O
therefore	O
uses	O
SFTP	B-Protocol
for	O
file	B-Protocol
transfers	I-Protocol
by	O
default	O
instead	O
of	O
the	O
legacy	O
SCP/RCP	O
protocol	O
.	O
</s>
<s>
The	O
SCP	O
is	O
a	O
network	O
protocol	O
,	O
based	O
on	O
the	O
BSD	B-Operating_System
RCP	B-Application
protocol	O
,	O
which	O
supports	O
file	B-Protocol
transfers	I-Protocol
between	O
hosts	O
on	O
a	O
network	O
.	O
</s>
<s>
SCP	O
uses	O
Secure	B-Protocol
Shell	I-Protocol
(	O
SSH	B-Protocol
)	O
for	O
data	O
transfer	O
and	O
uses	O
the	O
same	O
mechanisms	O
for	O
authentication	O
,	O
thereby	O
ensuring	O
the	O
authenticity	O
and	O
confidentiality	O
of	O
the	O
data	B-General_Concept
in	I-General_Concept
transit	I-General_Concept
.	O
</s>
<s>
Clients	O
can	O
also	O
request	O
files	O
or	O
directories	B-Application
from	O
a	O
server	O
(	O
download	O
)	O
.	O
</s>
<s>
SCP	O
runs	O
over	O
TCP	B-Protocol
port	I-Protocol
22	O
by	O
default	O
.	O
</s>
<s>
Like	O
RCP	B-Application
,	O
there	O
is	O
no	O
RFC	O
that	O
defines	O
the	O
specifics	O
of	O
the	O
protocol	O
.	O
</s>
<s>
Normally	O
,	O
a	O
client	O
initiates	O
an	O
SSH	B-Protocol
connection	O
to	O
the	O
remote	O
host	B-Application
,	O
and	O
requests	O
an	O
SCP	O
process	O
to	O
be	O
started	O
on	O
the	O
remote	O
server	O
.	O
</s>
<s>
sink	O
mode	O
,	O
which	O
accepts	O
the	O
files	O
sent	O
by	O
the	O
client	O
and	O
writes	O
them	O
(	O
usually	O
to	O
disk	O
)	O
on	O
the	O
remote	O
host	B-Application
.	O
</s>
<s>
In	O
the	O
past	O
,	O
in	O
remote-to-remote	O
secure	B-Protocol
copy	I-Protocol
,	O
the	O
SCP	O
client	O
opens	O
an	O
SSH	B-Protocol
connection	O
to	O
the	O
source	O
host	B-Application
and	O
requests	O
that	O
it	O
,	O
in	O
turn	O
,	O
open	O
an	O
SCP	O
connection	O
to	O
the	O
destination	O
.	O
</s>
<s>
SCP	O
does	O
not	O
expect	O
text	O
communicating	O
with	O
the	O
SSH	B-Protocol
login	O
shell	O
.	O
</s>
<s>
Text	O
transmitted	O
due	O
to	O
the	O
SSH	B-Protocol
profile	O
(	O
e.g.	O
</s>
<s>
Perhaps	O
the	O
most	O
widely	O
used	O
SCP	O
program	O
is	O
the	O
OpenSSH	B-Language
command	B-Application
line	I-Application
scp	O
program	O
,	O
which	O
is	O
provided	O
in	O
most	O
SSH	B-Protocol
implementations	O
.	O
</s>
<s>
The	O
scp	O
program	O
is	O
the	O
secure	O
analog	O
of	O
the	O
rcp	B-Application
command	B-Application
.	O
</s>
<s>
The	O
scp	O
program	O
must	O
be	O
part	O
of	O
all	O
SSH	B-Protocol
servers	O
that	O
want	O
to	O
provide	O
SCP	O
service	O
,	O
as	O
scp	O
functions	O
as	O
SCP	O
server	O
too	O
.	O
</s>
<s>
Some	O
SSH	B-Protocol
implementations	O
provide	O
the	O
scp2	O
program	O
,	O
which	O
uses	O
the	O
SFTP	B-Protocol
protocol	O
instead	O
of	O
SCP	O
,	O
but	O
provides	O
the	O
very	O
same	O
command	B-Application
line	I-Application
interface	I-Application
as	O
scp	O
.	O
</s>
<s>
scp	O
is	O
then	O
typically	O
a	O
symbolic	B-Application
link	I-Application
to	O
scp2	O
.	O
</s>
<s>
Typically	O
,	O
a	O
syntax	O
of	O
scp	O
program	O
is	O
like	O
the	O
syntax	O
of	O
cp	B-Application
(	O
copy	O
)	O
:	O
</s>
<s>
Copying	O
local	O
file	O
to	O
a	O
remote	O
host	B-Application
:	O
</s>
<s>
Copying	O
file	O
from	O
remote	O
host	B-Application
and	O
copying	O
folder	O
from	O
remote	O
host	B-Application
(	O
with	O
-r	O
switch	O
)	O
:	O
</s>
<s>
Note	O
that	O
if	O
the	O
remote	O
host	B-Application
uses	O
a	O
port	O
other	O
than	O
the	O
default	O
of	O
22	O
,	O
it	O
can	O
be	O
specified	O
in	O
the	O
command	B-Application
.	O
</s>
<s>
For	O
example	O
,	O
copying	O
a	O
file	O
from	O
host	B-Application
:	O
</s>
<s>
As	O
the	O
Secure	B-Protocol
Copy	I-Protocol
Protocol	I-Protocol
implements	O
file	B-Protocol
transfers	I-Protocol
only	O
,	O
GUI	B-Application
SCP	O
clients	O
are	O
rare	O
,	O
as	O
implementing	O
it	O
requires	O
additional	O
functionality	O
(	O
directory	B-Application
listing	O
at	O
least	O
)	O
.	O
</s>
<s>
For	O
example	O
,	O
WinSCP	B-Protocol
defaults	O
to	O
the	O
SFTP	B-Protocol
protocol	O
.	O
</s>
<s>
Even	O
when	O
operating	O
in	O
SCP	O
mode	O
,	O
clients	O
like	O
WinSCP	B-Protocol
are	O
typically	O
not	O
pure	O
SCP	O
clients	O
,	O
as	O
they	O
must	O
use	O
other	O
means	O
to	O
implement	O
the	O
additional	O
functionality	O
(	O
like	O
the	O
ls	B-Application
command	B-Application
)	O
.	O
</s>
<s>
More	O
comprehensive	O
tools	O
for	O
managing	O
files	O
over	O
SSH	B-Protocol
are	O
SFTP	B-Protocol
clients	O
.	O
</s>
<s>
In	O
2019	O
vulnerability	O
was	O
announced	O
related	O
to	O
the	O
openssh	B-Language
SCP	O
tool	O
and	O
protocol	O
allowing	O
users	O
to	O
overwrite	O
arbitrary	O
files	O
in	O
the	O
SCP	O
client	O
target	O
directory	B-Application
.	O
</s>
