132 Chapter 10. SSH Protocol
• Interception of communication between two systems — In this scenario, a third party exists some-
where on the network between communicating entities and makes a copy of the information being
passed between them. The intercepting party may intercept and keep the information, or it may alter
the information and send it on to the intended recipient.
• Impersonation of a particular host — Using this strategy, an intercepting system pretends to be the
intended recipient of a message. If the strategy works, the client remains unaware of the deception
and continues to communicate with the interceptor as if its traffic had successfully reached its
destination.
Both techniques cause information to be intercepted, possibly for hostile reasons. The results can be
disastrous, whether that goal is achieved by listening for all packets on a LAN or a hacked DNS server
pointing to a maliciously duplicated host.
If SSH is used for remote shell logins and file copying, these security threats can be greatly diminished.
A server’s digital signature provides verification for its identity. The entire communication between
client and server systems cannot be used if intercepted, because each of the packets is encrypted.
Attempts to spoof the identity of either side of a communication will not work, since each packet is
encrypted using a key known only by the local and remote systems.
10.2. Event Sequence of an SSH Connection
The following series of events helps protect the integrity of SSH communication between two hosts.
First, a secure transport layer is created so that the client knows that it is communicating with the
correct server. Then, the communication is encrypted between the client and server using a symmetric
cipher.
With a secure connection to the server in place, the client authenticates itself to the server without
worrying that the authentication information may be compromised.
Finally, with the client authenticated to the server, several different services can be safely and securely
used through the connection, such as an interactive shell session, X11 applications, and tunneled
TCP/IP ports.
10.3. Layers of SSH Security
The SSH protocol allows any client and server programs built to the protocol’s specifications to com-
municate securely and to be used interchangeably.
Two varieties of SSH currently exist. SSH version 1 contains several patented encryption algorithms
(however, several of these patents have expired) and a security hole that potentially allows for data to
be inserted into the data stream. The OpenSSH suite under Red Hat Linux 7.3 uses SSH version 2.0 by
default, although it also supports version 1. It is recommended that you use SSH version 2-compatible
servers and clients whenever possible
SSH protocol versions 1 and 2 both add layers of security with each of these layers providing its own
type of protection.
10.3.1. Transport Layer
The primary role of the transport layer is to facilitate safe and secure communication between the
two hosts at the time of and after authentication. Usually running over TCP/IP, the transport layer
accomplishes this by handling the encryption and decryption of data and providing integrity protection
of data packets as they are sent and received. In addition, the transport layer provides compression,
speeding the transfer of information.
Commenti su questo manuale