<s>
The	O
Secure	B-Protocol
Shell	I-Protocol
Protocol	I-Protocol
(	O
SSH	B-Protocol
)	O
is	O
a	O
cryptographic	O
network	O
protocol	O
for	O
operating	O
network	B-General_Concept
services	I-General_Concept
securely	O
over	O
an	O
unsecured	O
network	O
.	O
</s>
<s>
Its	O
most	O
notable	O
applications	O
are	O
remote	O
login	B-General_Concept
and	O
command-line	B-Application
execution	O
.	O
</s>
<s>
SSH	B-Protocol
applications	O
are	O
based	O
on	O
a	O
client	B-Operating_System
–	I-Operating_System
server	I-Operating_System
architecture	I-Operating_System
,	O
connecting	O
an	O
SSH	B-Protocol
client	I-Protocol
instance	O
with	O
an	O
SSH	B-Protocol
server	I-Protocol
.	O
</s>
<s>
SSH	B-Protocol
operates	O
as	O
a	O
layered	O
protocol	O
suite	O
comprising	O
three	O
principal	O
hierarchical	O
components	O
:	O
the	O
transport	B-Architecture
layer	I-Architecture
provides	O
server	O
authentication	O
,	O
confidentiality	O
,	O
and	O
integrity	O
;	O
the	O
user	O
authentication	O
protocol	O
validates	O
the	O
user	O
to	O
the	O
server	O
;	O
and	O
the	O
connection	O
protocol	O
multiplexes	O
the	O
encrypted	O
tunnel	O
into	O
multiple	O
logical	O
communication	O
channels	O
.	O
</s>
<s>
SSH	B-Protocol
was	O
designed	O
on	O
Unix-like	B-Operating_System
operating	I-Operating_System
systems	I-Operating_System
,	O
as	O
a	O
replacement	O
for	O
Telnet	B-Protocol
and	O
for	O
unsecured	O
remote	O
Unix	B-Application
shell	I-Application
protocols	O
,	O
such	O
as	O
the	O
Berkeley	O
Remote	B-Protocol
Shell	I-Protocol
(	O
rsh	B-Protocol
)	O
and	O
the	O
related	O
rlogin	B-Application
and	O
rexec	B-Application
protocols	O
,	O
which	O
all	O
use	O
insecure	O
,	O
plaintext	O
transmission	O
of	O
authentication	O
tokens	O
.	O
</s>
<s>
SSH	B-Protocol
was	O
first	O
designed	O
in	O
1995	O
by	O
Finnish	O
computer	O
scientist	O
Tatu	O
Ylönen	O
.	O
</s>
<s>
The	O
protocol	O
specification	O
distinguishes	O
two	O
major	O
versions	O
,	O
referred	O
to	O
as	O
SSH-1	O
and	O
SSH-2	O
.	O
</s>
<s>
The	O
most	O
commonly	O
implemented	O
software	O
stack	O
is	O
OpenSSH	B-Language
,	O
released	O
in	O
1999	O
as	O
open-source	B-Application
software	I-Application
by	O
the	O
OpenBSD	B-Operating_System
developers	O
.	O
</s>
<s>
Implementations	O
are	O
distributed	O
for	O
all	O
types	O
of	O
operating	B-General_Concept
systems	I-General_Concept
in	O
common	O
use	O
,	O
including	O
embedded	O
systems	O
.	O
</s>
<s>
SSH	B-Protocol
uses	O
public-key	B-Application
cryptography	I-Application
to	O
authenticate	O
the	O
remote	O
computer	O
and	O
allow	O
it	O
to	O
authenticate	O
the	O
user	O
,	O
if	O
necessary	O
.	O
</s>
<s>
SSH	B-Protocol
may	O
be	O
used	O
in	O
several	O
methodologies	O
.	O
</s>
<s>
When	O
the	O
public-private	O
key	B-Application
pair	I-Application
is	O
generated	O
by	O
the	O
user	O
manually	O
,	O
the	O
authentication	O
is	O
essentially	O
performed	O
when	O
the	O
key	B-Application
pair	I-Application
is	O
created	O
,	O
and	O
a	O
session	O
may	O
then	O
be	O
opened	O
automatically	O
without	O
a	O
password	O
prompt	O
.	O
</s>
<s>
In	O
this	O
scenario	O
,	O
the	O
public	B-Application
key	I-Application
is	O
placed	O
on	O
all	O
computers	O
that	O
must	O
allow	O
access	O
to	O
the	O
owner	O
of	O
the	O
matching	O
private	B-Application
key	I-Application
,	O
which	O
the	O
owner	O
keeps	O
private	O
.	O
</s>
<s>
While	O
authentication	O
is	O
based	O
on	O
the	O
private	B-Application
key	I-Application
,	O
the	O
key	O
is	O
never	O
transferred	O
through	O
the	O
network	O
during	O
authentication	O
.	O
</s>
<s>
SSH	B-Protocol
only	O
verifies	O
that	O
the	O
same	O
person	O
offering	O
the	O
public	B-Application
key	I-Application
also	O
owns	O
the	O
matching	O
private	B-Application
key	I-Application
.	O
</s>
<s>
In	O
all	O
versions	O
of	O
SSH	B-Protocol
it	O
is	O
important	O
to	O
verify	O
unknown	O
public	B-Application
keys	I-Application
,	O
i.e.	O
</s>
<s>
associate	O
the	O
public	B-Application
keys	I-Application
with	O
identities	O
,	O
before	O
accepting	O
them	O
as	O
valid	O
.	O
</s>
<s>
Accepting	O
an	O
attacker	O
's	O
public	B-Application
key	I-Application
without	O
validation	O
will	O
authorize	O
an	O
unauthorized	O
attacker	O
as	O
a	O
valid	O
user	O
.	O
</s>
<s>
On	O
Unix-like	B-Operating_System
systems	I-Operating_System
,	O
the	O
list	O
of	O
authorized	O
public	B-Application
keys	I-Application
is	O
typically	O
stored	O
in	O
the	O
home	O
directory	O
of	O
the	O
user	O
that	O
is	O
allowed	O
to	O
log	O
in	O
remotely	O
,	O
in	O
the	O
file	O
~	O
/.ssh/authorized_keys	O
.	O
</s>
<s>
This	O
file	O
is	O
respected	O
by	O
SSH	B-Protocol
only	O
if	O
it	O
is	O
not	O
writable	O
by	O
anything	O
apart	O
from	O
the	O
owner	O
and	O
root	O
.	O
</s>
<s>
When	O
the	O
public	B-Application
key	I-Application
is	O
present	O
on	O
the	O
remote	O
end	O
and	O
the	O
matching	O
private	B-Application
key	I-Application
is	O
present	O
on	O
the	O
local	O
end	O
,	O
typing	O
in	O
the	O
password	O
is	O
no	O
longer	O
required	O
.	O
</s>
<s>
However	O
,	O
for	O
additional	O
security	O
the	O
private	B-Application
key	I-Application
itself	O
can	O
be	O
locked	O
with	O
a	O
passphrase	O
.	O
</s>
<s>
The	O
private	B-Application
key	I-Application
can	O
also	O
be	O
looked	O
for	O
in	O
standard	O
places	O
,	O
and	O
its	O
full	O
path	O
can	O
be	O
specified	O
as	O
a	O
command	B-Application
line	I-Application
setting	O
(	O
the	O
option	O
-i	O
for	O
ssh	B-Protocol
)	O
.	O
</s>
<s>
The	O
ssh-keygen	B-Protocol
utility	O
produces	O
the	O
public	O
and	O
private	B-Application
keys	I-Application
,	O
always	O
in	O
pairs	O
.	O
</s>
<s>
SSH	B-Protocol
also	O
supports	O
password-based	O
authentication	O
that	O
is	O
encrypted	O
by	O
automatically	O
generated	O
keys	O
.	O
</s>
<s>
However	O
,	O
this	O
is	O
possible	O
only	O
if	O
the	O
two	O
sides	O
have	O
never	O
authenticated	O
before	O
,	O
as	O
SSH	B-Protocol
remembers	O
the	O
key	O
that	O
the	O
server	O
side	O
previously	O
used	O
.	O
</s>
<s>
The	O
SSH	B-Protocol
client	I-Protocol
raises	O
a	O
warning	O
before	O
accepting	O
the	O
key	O
of	O
a	O
new	O
,	O
previously	O
unknown	O
server	O
.	O
</s>
<s>
SSH	B-Protocol
is	O
typically	O
used	O
to	O
log	O
into	O
a	O
remote	O
machine	O
and	O
execute	O
commands	O
,	O
but	O
it	O
also	O
supports	O
tunneling	B-Protocol
,	O
forwarding	B-Protocol
TCP	B-Protocol
ports	I-Protocol
and	O
X11	B-Operating_System
connections	O
;	O
it	O
can	O
transfer	O
files	O
using	O
the	O
associated	O
SSH	B-Protocol
file	I-Protocol
transfer	I-Protocol
(	O
SFTP	O
)	O
or	O
secure	B-Protocol
copy	I-Protocol
(	O
SCP	O
)	O
protocols	O
.	O
</s>
<s>
SSH	B-Protocol
uses	O
the	O
client	B-Operating_System
–	I-Operating_System
server	I-Operating_System
model	I-Operating_System
.	O
</s>
<s>
An	O
SSH	B-Protocol
client	I-Protocol
program	O
is	O
typically	O
used	O
for	O
establishing	O
connections	O
to	O
an	O
SSH	B-Protocol
daemon	B-Operating_System
,	O
such	O
as	O
sshd	O
,	O
accepting	O
remote	O
connections	O
.	O
</s>
<s>
Both	O
are	O
commonly	O
present	O
on	O
most	O
modern	O
operating	B-General_Concept
systems	I-General_Concept
,	O
including	O
macOS	B-Application
,	O
most	O
distributions	O
of	O
Linux	B-Application
,	O
OpenBSD	B-Operating_System
,	O
FreeBSD	B-Operating_System
,	O
NetBSD	B-Device
,	O
Solaris	B-Application
and	O
OpenVMS	B-Operating_System
.	O
</s>
<s>
Notably	O
,	O
versions	O
of	O
Windows	B-Application
prior	O
to	O
Windows	B-Application
10	O
version	O
1709	O
do	O
not	O
include	O
SSH	B-Protocol
by	O
default	O
.	O
</s>
<s>
Proprietary	B-Application
,	O
freeware	B-License
and	O
open	B-Application
source	I-Application
(	O
e.g.	O
</s>
<s>
PuTTY	B-Operating_System
,	O
and	O
the	O
version	O
of	O
OpenSSH	B-Language
which	O
is	O
part	O
of	O
Cygwin	B-Language
)	O
versions	O
of	O
various	O
levels	O
of	O
complexity	O
and	O
completeness	O
exist	O
.	O
</s>
<s>
File	O
managers	O
for	O
UNIX-like	B-Operating_System
systems	I-Operating_System
(	O
e.g.	O
</s>
<s>
Konqueror	B-Application
)	O
can	O
use	O
the	O
FISH	B-Protocol
protocol	I-Protocol
to	O
provide	O
a	O
split-pane	O
GUI	O
with	O
drag-and-drop	O
.	O
</s>
<s>
The	O
open	B-Application
source	I-Application
Windows	B-Application
program	O
WinSCP	B-Protocol
provides	O
similar	O
file	O
management	O
(	O
synchronization	O
,	O
copy	O
,	O
remote	O
delete	O
)	O
capability	O
using	O
PuTTY	B-Operating_System
as	O
a	O
back-end	O
.	O
</s>
<s>
Both	O
WinSCP	B-Protocol
and	O
PuTTY	B-Operating_System
are	O
available	O
packaged	O
to	O
run	O
directly	O
off	O
a	O
USB	O
drive	O
,	O
without	O
requiring	O
installation	O
on	O
the	O
client	B-Protocol
machine	I-Protocol
.	O
</s>
<s>
The	O
secure	B-Protocol
shell	I-Protocol
extension	O
to	O
the	O
Chrome	B-Application
browser	I-Application
also	O
allows	O
SSH	B-Protocol
connections	O
without	O
any	O
software	O
installation	O
and	O
even	O
allows	O
SSH	B-Protocol
from	O
a	O
Chromebook	B-Operating_System
computer	O
.	O
</s>
<s>
Setting	O
up	O
an	O
SSH	B-Protocol
server	I-Protocol
in	O
Windows	B-Application
typically	O
involves	O
enabling	O
a	O
feature	O
in	O
Settings	O
app	O
.	O
</s>
<s>
In	O
Windows	B-Application
10	O
version	O
1709	O
,	O
an	O
official	O
Win32	O
port	B-Protocol
of	O
OpenSSH	B-Language
is	O
available	O
.	O
</s>
<s>
SSH	B-Protocol
is	O
important	O
in	O
cloud	B-Architecture
computing	I-Architecture
to	O
solve	O
connectivity	O
problems	O
,	O
avoiding	O
the	O
security	O
issues	O
of	O
exposing	O
a	O
cloud-based	B-Architecture
virtual	O
machine	O
directly	O
on	O
the	O
Internet	O
.	O
</s>
<s>
An	O
SSH	B-Protocol
tunnel	O
can	O
provide	O
a	O
secure	O
path	O
over	O
the	O
Internet	O
,	O
through	O
a	O
firewall	O
to	O
a	O
virtual	O
machine	O
.	O
</s>
<s>
The	O
IANA	O
has	O
assigned	O
TCP	B-Protocol
port	I-Protocol
22	I-Protocol
,	O
UDP	B-Protocol
port	B-Protocol
22	I-Protocol
and	O
SCTP	B-Protocol
port	B-Protocol
22	I-Protocol
for	O
this	O
protocol	O
.	O
</s>
<s>
IANA	O
had	O
listed	O
the	O
standard	O
TCP	B-Protocol
port	I-Protocol
22	O
for	O
SSH	B-Protocol
servers	I-Protocol
as	O
one	O
of	O
the	O
well-known	O
ports	O
as	O
early	O
as	O
2001	O
.	O
</s>
<s>
SSH	B-Protocol
can	O
also	O
be	O
run	O
using	O
SCTP	B-Protocol
rather	O
than	O
TCP	B-Protocol
as	O
the	O
connection	O
oriented	O
transport	B-Architecture
layer	I-Architecture
protocol	O
.	O
</s>
<s>
In	O
1995	O
,	O
Tatu	O
Ylönen	O
,	O
a	O
researcher	O
at	O
Helsinki	O
University	O
of	O
Technology	O
,	O
Finland	O
,	O
designed	O
the	O
first	O
version	O
of	O
the	O
protocol	O
(	O
now	O
called	O
SSH-1	O
)	O
prompted	O
by	O
a	O
password-sniffing	O
attack	O
at	O
his	O
university	B-General_Concept
network	I-General_Concept
.	O
</s>
<s>
The	O
goal	O
of	O
SSH	B-Protocol
was	O
to	O
replace	O
the	O
earlier	O
rlogin	B-Application
,	O
TELNET	B-Protocol
,	O
FTP	B-Protocol
and	O
rsh	B-Protocol
protocols	O
,	O
which	O
did	O
not	O
provide	O
strong	O
authentication	O
nor	O
guarantee	O
confidentiality	O
.	O
</s>
<s>
Ylönen	O
released	O
his	O
implementation	O
as	O
freeware	B-License
in	O
July	O
1995	O
,	O
and	O
the	O
tool	O
quickly	O
gained	O
in	O
popularity	O
.	O
</s>
<s>
Towards	O
the	O
end	O
of	O
1995	O
,	O
the	O
SSH	B-Protocol
user	O
base	O
had	O
grown	O
to	O
20,000	O
users	O
in	O
fifty	O
countries	O
.	O
</s>
<s>
In	O
December	O
1995	O
,	O
Ylönen	O
founded	O
SSH	B-Protocol
Communications	O
Security	O
to	O
market	O
and	O
develop	O
SSH	B-Protocol
.	O
</s>
<s>
The	O
original	O
version	O
of	O
the	O
SSH	B-Protocol
software	O
used	O
various	O
pieces	O
of	O
free	B-Application
software	I-Application
,	O
such	O
as	O
GNU	B-Application
libgmp	I-Application
,	O
but	O
later	O
versions	O
released	O
by	O
SSH	B-Protocol
Communications	O
Security	O
evolved	O
into	O
increasingly	O
proprietary	B-Application
software	I-Application
.	O
</s>
<s>
"	O
Secsh	O
"	O
was	O
the	O
official	O
Internet	O
Engineering	O
Task	O
Force	O
's	O
(	O
IETF	O
)	O
name	O
for	O
the	O
IETF	O
working	O
group	O
responsible	O
for	O
version	O
2	O
of	O
the	O
SSH	B-Protocol
protocol	O
.	O
</s>
<s>
In	O
2006	O
,	O
a	O
revised	O
version	O
of	O
the	O
protocol	O
,	O
SSH-2	O
,	O
was	O
adopted	O
as	O
a	O
standard	O
.	O
</s>
<s>
This	O
version	O
is	O
incompatible	O
with	O
SSH-1	O
.	O
</s>
<s>
SSH-2	O
features	O
both	O
security	O
and	O
feature	O
improvements	O
over	O
SSH-1	O
.	O
</s>
<s>
Better	O
security	O
,	O
for	O
example	O
,	O
comes	O
through	O
Diffie	B-Protocol
–	I-Protocol
Hellman	I-Protocol
key	I-Protocol
exchange	I-Protocol
and	O
strong	O
integrity	O
checking	O
via	O
message	B-Algorithm
authentication	I-Algorithm
codes	I-Algorithm
.	O
</s>
<s>
New	O
features	O
of	O
SSH-2	O
include	O
the	O
ability	O
to	O
run	O
any	O
number	O
of	O
shell	B-Application
sessions	O
over	O
a	O
single	O
SSH	B-Protocol
connection	O
.	O
</s>
<s>
Due	O
to	O
SSH-2	O
'	O
s	O
superiority	O
and	O
popularity	O
over	O
SSH-1	O
,	O
some	O
implementations	O
such	O
as	O
libssh	O
(	O
v0.8.0	O
+	O
)	O
,	O
Lsh	B-Algorithm
and	O
Dropbear	B-Protocol
support	O
only	O
the	O
SSH-2	O
protocol	O
.	O
</s>
<s>
In	O
January	O
2006	O
,	O
well	O
after	O
version	O
2.1	O
was	O
established	O
,	O
specified	O
that	O
an	O
SSH	B-Protocol
server	I-Protocol
supporting	O
2.0	O
as	O
well	O
as	O
prior	O
versions	O
should	O
identify	O
its	O
protocol	O
version	O
as	O
1.99	O
.	O
</s>
<s>
This	O
version	O
number	O
does	O
not	O
reflect	O
a	O
historical	O
software	O
revision	O
,	O
but	O
a	O
method	O
to	O
identify	O
backward	B-General_Concept
compatibility	I-General_Concept
.	O
</s>
<s>
In	O
1999	O
,	O
developers	O
,	O
desiring	O
availability	O
of	O
a	O
free	B-Application
software	I-Application
version	O
,	O
restarted	O
software	O
development	O
from	O
the	O
1.2.12	O
release	O
of	O
the	O
original	O
SSH	B-Protocol
program	O
,	O
which	O
was	O
the	O
last	O
released	O
under	O
an	O
open	B-Application
source	I-Application
license	O
.	O
</s>
<s>
Shortly	O
thereafter	O
,	O
OpenBSD	B-Operating_System
developers	O
forked	O
Grönvall	O
's	O
code	O
and	O
created	O
OpenSSH	B-Language
,	O
which	O
shipped	O
with	O
Release	O
2.6	O
of	O
OpenBSD	B-Operating_System
.	O
</s>
<s>
From	O
this	O
version	O
,	O
a	O
"	O
portability	O
"	O
branch	O
was	O
formed	O
to	O
port	B-Protocol
OpenSSH	B-Language
to	O
other	O
operating	B-General_Concept
systems	I-General_Concept
.	O
</s>
<s>
,	O
OpenSSH	B-Language
was	O
the	O
single	O
most	O
popular	O
SSH	B-Protocol
implementation	O
,	O
being	O
the	O
default	O
version	O
in	O
a	O
large	O
number	O
of	O
operating	B-General_Concept
system	I-General_Concept
distributions	O
.	O
</s>
<s>
OpenSSH	B-Language
continues	O
to	O
be	O
maintained	O
and	O
supports	O
the	O
SSH-2	O
protocol	O
,	O
having	O
expunged	O
SSH-1	O
support	O
from	O
the	O
codebase	O
in	O
the	O
OpenSSH	B-Language
7.6	O
release	O
.	O
</s>
<s>
SSH	B-Protocol
is	O
a	O
protocol	O
that	O
can	O
be	O
used	O
for	O
many	O
applications	O
across	O
many	O
platforms	O
including	O
most	O
Unix	B-Application
variants	O
(	O
Linux	B-Application
,	O
the	O
BSDs	B-Operating_System
including	O
Apple	O
's	O
macOS	B-Application
,	O
and	O
Solaris	B-Application
)	O
,	O
as	O
well	O
as	O
Microsoft	B-Application
Windows	I-Application
.	O
</s>
<s>
Some	O
of	O
the	O
applications	O
below	O
may	O
require	O
features	O
that	O
are	O
only	O
available	O
or	O
compatible	O
with	O
specific	O
SSH	B-Protocol
clients	I-Protocol
or	O
servers	O
.	O
</s>
<s>
For	O
example	O
,	O
using	O
the	O
SSH	B-Protocol
protocol	O
to	O
implement	O
a	O
VPN	B-Application
is	O
possible	O
,	O
but	O
presently	O
only	O
with	O
the	O
OpenSSH	B-Language
server	O
and	O
client	B-Protocol
implementation	O
.	O
</s>
<s>
For	O
tunneling	B-Protocol
(	O
not	O
to	O
be	O
confused	O
with	O
a	O
VPN	B-Application
,	O
which	O
routes	O
packets	O
between	O
different	O
networks	O
,	O
or	O
bridges	O
two	O
broadcast	B-Architecture
domains	I-Architecture
into	O
one	O
)	O
.	O
</s>
<s>
For	O
using	O
as	O
a	O
full-fledged	O
encrypted	O
VPN	B-Application
.	O
</s>
<s>
Note	O
that	O
only	O
OpenSSH	B-Language
server	O
and	O
client	B-Protocol
supports	O
this	O
feature	O
.	O
</s>
<s>
For	O
browsing	O
the	O
web	O
through	O
an	O
encrypted	O
proxy	O
connection	O
with	O
SSH	B-Protocol
clients	I-Protocol
that	O
support	O
the	O
SOCKS	B-Application
protocol	I-Application
.	O
</s>
<s>
For	O
securely	O
mounting	O
a	O
directory	O
on	O
a	O
remote	O
server	O
as	O
a	O
filesystem	B-Application
on	O
a	O
local	O
computer	O
using	O
SSHFS	B-Application
.	O
</s>
<s>
For	O
development	O
on	O
a	O
mobile	O
or	O
embedded	O
device	O
that	O
supports	O
SSH	B-Protocol
.	O
</s>
<s>
For	O
securing	O
file	B-Protocol
transfer	I-Protocol
protocols	I-Protocol
.	O
</s>
<s>
The	O
Secure	B-Protocol
Shell	I-Protocol
protocols	I-Protocol
are	O
used	O
in	O
several	O
file	O
transfer	O
mechanisms	O
.	O
</s>
<s>
rsync	B-Application
,	O
intended	O
to	O
be	O
more	O
efficient	O
than	O
SCP	O
.	O
</s>
<s>
Generally	O
runs	O
over	O
an	O
SSH	B-Protocol
connection	O
.	O
</s>
<s>
Fast	B-Protocol
and	I-Protocol
Secure	I-Protocol
Protocol	I-Protocol
(	O
FASP	B-Protocol
)	O
,	O
aka	O
Aspera	O
,	O
uses	O
SSH	B-Protocol
for	O
control	O
and	O
UDP	B-Protocol
ports	I-Protocol
for	O
data	O
transfer	O
.	O
</s>
<s>
The	O
SSH	B-Protocol
protocol	O
has	O
a	O
layered	O
architecture	O
with	O
three	O
separate	O
components	O
:	O
</s>
<s>
The	O
transport	B-Architecture
layer	I-Architecture
(	O
)	O
typically	O
uses	O
the	O
Transmission	B-Protocol
Control	I-Protocol
Protocol	I-Protocol
(	O
TCP	B-Protocol
)	O
of	O
TCP/IP	B-Protocol
,	O
reserving	O
port	B-Protocol
number	I-Protocol
22	O
as	O
a	O
server	O
listening	O
port	B-Protocol
.	O
</s>
<s>
The	O
transport	B-Architecture
layer	I-Architecture
also	O
arranges	O
for	O
key	O
re-exchange	O
,	O
usually	O
after	O
1	O
GB	O
of	O
data	O
has	O
been	O
transferred	O
or	O
after	O
one	O
hour	O
has	O
passed	O
,	O
whichever	O
occurs	O
first	O
.	O
</s>
<s>
The	O
user	O
authentication	O
layer	O
(	O
)	O
handles	O
client	B-Protocol
authentication	O
,	O
and	O
provides	O
a	O
suite	O
of	O
authentication	O
algorithms	O
.	O
</s>
<s>
Authentication	O
is	O
client-driven	O
:	O
when	O
one	O
is	O
prompted	O
for	O
a	O
password	O
,	O
it	O
may	O
be	O
the	O
SSH	B-Protocol
client	I-Protocol
prompting	O
,	O
not	O
the	O
server	O
.	O
</s>
<s>
The	O
server	O
merely	O
responds	O
to	O
the	O
client	B-Protocol
's	O
authentication	O
requests	O
.	O
</s>
<s>
publickey	O
:	O
a	O
method	O
for	O
public-key-based	B-Application
authentication	I-Application
,	O
usually	O
supporting	O
at	O
least	O
DSA	O
,	O
ECDSA	O
or	O
RSA	B-Architecture
keypairs	B-Application
,	O
with	O
other	O
implementations	O
also	O
supporting	O
X.509	O
certificates	O
.	O
</s>
<s>
keyboard-interactive	O
(	O
)	O
:	O
a	O
versatile	O
method	O
where	O
the	O
server	O
sends	O
one	O
or	O
more	O
prompts	O
to	O
enter	O
information	O
and	O
the	O
client	B-Protocol
displays	O
them	O
and	O
sends	O
back	O
responses	O
keyed-in	O
by	O
the	O
user	O
.	O
</s>
<s>
Used	O
by	O
some	O
OpenSSH	B-Language
configurations	O
when	O
PAM	B-Application
is	O
the	O
underlying	O
host-authentication	O
provider	O
to	O
effectively	O
provide	O
password	O
authentication	O
,	O
sometimes	O
leading	O
to	O
inability	O
to	O
log	O
in	O
with	O
a	O
client	B-Protocol
that	O
supports	O
just	O
the	O
plain	O
password	O
authentication	O
method	O
.	O
</s>
<s>
GSSAPI	O
authentication	O
methods	O
which	O
provide	O
an	O
extensible	O
scheme	O
to	O
perform	O
SSH	B-Protocol
authentication	O
using	O
external	O
mechanisms	O
such	O
as	O
Kerberos	B-Protocol
5	I-Protocol
or	O
NTLM	O
,	O
providing	O
single	O
sign-on	O
capability	O
to	O
SSH	B-Protocol
sessions	O
.	O
</s>
<s>
These	O
methods	O
are	O
usually	O
implemented	O
by	O
commercial	O
SSH	B-Protocol
implementations	O
for	O
use	O
in	O
organizations	O
,	O
though	O
OpenSSH	B-Language
does	O
have	O
a	O
working	O
GSSAPI	O
implementation	O
.	O
</s>
<s>
The	O
connection	O
layer	O
(	O
)	O
defines	O
the	O
concept	O
of	O
channels	O
,	O
channel	O
requests	O
,	O
and	O
global	O
requests	O
,	O
which	O
define	O
the	O
SSH	B-Protocol
services	O
provided	O
.	O
</s>
<s>
A	O
single	O
SSH	B-Protocol
connection	O
can	O
be	O
multiplexed	O
into	O
multiple	O
logical	O
channels	O
simultaneously	O
,	O
each	O
transferring	O
data	O
bidirectionally	O
.	O
</s>
<s>
The	O
SSH	B-Protocol
client	I-Protocol
requests	O
a	O
server-side	O
port	B-Protocol
to	O
be	O
forwarded	O
using	O
a	O
global	O
request	O
.	O
</s>
<s>
The	O
SSHFP	B-Protocol
DNS	O
record	O
(	O
RFC	O
4255	O
)	O
provides	O
the	O
public	O
host	B-Device
key	B-Algorithm
fingerprints	I-Algorithm
in	O
order	O
to	O
aid	O
in	O
verifying	O
the	O
authenticity	O
of	O
the	O
host	B-Device
.	O
</s>
<s>
This	O
open	O
architecture	O
provides	O
considerable	O
flexibility	O
,	O
allowing	O
the	O
use	O
of	O
SSH	B-Protocol
for	O
a	O
variety	O
of	O
purposes	O
beyond	O
a	O
secure	B-Protocol
shell	I-Protocol
.	O
</s>
<s>
The	O
functionality	O
of	O
the	O
transport	B-Architecture
layer	I-Architecture
alone	O
is	O
comparable	O
to	O
Transport	B-Protocol
Layer	I-Protocol
Security	I-Protocol
(	O
TLS	O
)	O
;	O
the	O
user-authentication	O
layer	O
is	O
highly	O
extensible	O
with	O
custom	O
authentication	O
methods	O
;	O
and	O
the	O
connection	O
layer	O
provides	O
the	O
ability	O
to	O
multiplex	O
many	O
secondary	O
sessions	O
into	O
a	O
single	O
SSH	B-Protocol
connection	O
,	O
a	O
feature	O
comparable	O
to	O
BEEP	B-Protocol
and	O
not	O
available	O
in	O
TLS	O
.	O
</s>
<s>
EdDSA	B-Algorithm
,	O
ECDSA	O
,	O
RSA	B-Architecture
and	O
DSA	O
for	O
public-key	B-Application
cryptography	I-Application
.	O
</s>
<s>
ECDH	B-Protocol
and	O
Diffie	B-Protocol
–	I-Protocol
Hellman	I-Protocol
for	O
key	O
exchange	O
.	O
</s>
<s>
HMAC	B-Algorithm
,	O
AEAD	O
and	O
UMAC	B-Algorithm
for	O
MAC	B-Algorithm
.	O
</s>
<s>
AES	B-Algorithm
(	O
and	O
deprecated	O
RC4	B-Algorithm
,	O
3DES	B-Algorithm
,	O
DES	B-Algorithm
)	O
for	O
symmetric	B-Algorithm
encryption	I-Algorithm
.	O
</s>
<s>
AES-GCM	B-Algorithm
and	O
ChaCha20-Poly1305	B-Algorithm
for	O
AEAD	O
encryption	O
.	O
</s>
<s>
SHA	O
(	O
and	O
deprecated	O
MD5	B-Algorithm
)	O
for	O
key	B-Algorithm
fingerprint	I-Algorithm
.	O
</s>
<s>
In	O
1998	O
,	O
a	O
vulnerability	O
was	O
described	O
in	O
SSH	B-Protocol
1.5	O
which	O
allowed	O
the	O
unauthorized	O
insertion	O
of	O
content	O
into	O
an	O
encrypted	O
SSH	B-Protocol
stream	O
due	O
to	O
insufficient	O
data	O
integrity	O
protection	O
from	O
CRC-32	O
used	O
in	O
this	O
version	O
of	O
the	O
protocol	O
.	O
</s>
<s>
A	O
fix	O
known	O
as	O
SSH	B-Protocol
Compensation	O
Attack	O
Detector	O
was	O
introduced	O
into	O
most	O
implementations	O
.	O
</s>
<s>
Many	O
of	O
these	O
updated	O
implementations	O
contained	O
a	O
new	O
integer	B-Error_Name
overflow	I-Error_Name
vulnerability	O
that	O
allowed	O
attackers	O
to	O
execute	O
arbitrary	O
code	O
with	O
the	O
privileges	O
of	O
the	O
SSH	B-Protocol
daemon	B-Operating_System
,	O
typically	O
root	O
.	O
</s>
<s>
In	O
January	O
2001	O
a	O
vulnerability	O
was	O
discovered	O
that	O
allows	O
attackers	O
to	O
modify	O
the	O
last	O
block	O
of	O
an	O
IDEA-encrypted	O
session	O
.	O
</s>
<s>
The	O
same	O
month	O
,	O
another	O
vulnerability	O
was	O
discovered	O
that	O
allowed	O
a	O
malicious	O
server	O
to	O
forward	O
a	O
client	B-Protocol
authentication	O
to	O
another	O
server	O
.	O
</s>
<s>
Since	O
SSH-1	O
has	O
inherent	O
design	O
flaws	O
which	O
make	O
it	O
vulnerable	O
,	O
it	O
is	O
now	O
generally	O
considered	O
obsolete	O
and	O
should	O
be	O
avoided	O
by	O
explicitly	O
disabling	O
fallback	O
to	O
SSH-1	O
.	O
</s>
<s>
Most	O
modern	O
servers	O
and	O
clients	O
support	O
SSH-2	O
.	O
</s>
<s>
In	O
November	O
2008	O
,	O
a	O
theoretical	O
vulnerability	O
was	O
discovered	O
for	O
all	O
versions	O
of	O
SSH	B-Protocol
which	O
allowed	O
recovery	O
of	O
up	O
to	O
32	O
bits	O
of	O
plaintext	O
from	O
a	O
block	O
of	O
ciphertext	O
that	O
was	O
encrypted	O
using	O
what	O
was	O
then	O
the	O
standard	O
default	O
encryption	O
mode	O
,	O
CBC	O
.	O
</s>
<s>
The	O
most	O
straightforward	O
solution	O
is	O
to	O
use	O
CTR	O
,	O
counter	O
mode	O
,	O
instead	O
of	O
CBC	O
mode	O
,	O
since	O
this	O
renders	O
SSH	B-Protocol
resistant	O
to	O
the	O
attack	O
.	O
</s>
<s>
On	O
December	O
28	O
,	O
2014	O
Der	O
Spiegel	O
published	O
classified	O
information	O
leaked	O
by	O
whistleblower	O
Edward	O
Snowden	O
which	O
suggests	O
that	O
the	O
National	O
Security	O
Agency	O
may	O
be	O
able	O
to	O
decrypt	O
some	O
SSH	B-Protocol
traffic	O
.	O
</s>
<s>
A	O
2017	O
analysis	O
of	O
the	O
CIA	O
hacking	O
tools	O
BothanSpy	O
and	O
Gyrfalcon	O
suggested	O
that	O
the	O
SSH	B-Protocol
protocol	O
was	O
not	O
compromised	O
.	O
</s>
<s>
The	O
following	O
RFC	O
publications	O
by	O
the	O
IETF	O
"	O
secsh	O
"	O
working	O
group	O
document	O
SSH-2	O
as	O
a	O
proposed	O
Internet	O
standard	O
.	O
</s>
<s>
In	O
addition	O
,	O
the	O
OpenSSH	B-Language
project	O
includes	O
several	O
vendor	O
protocol	O
specifications/extensions	O
:	O
</s>
