Product SiteDocumentation Site

Chapter 18. OpenSSH

18.1. Features of SSH
18.1.1. Why Use SSH?
18.2. SSH Protocol Versions
18.3. Event Sequence of an SSH Connection
18.3.1. Transport Layer
18.3.2. Authentication
18.3.3. Channels
18.4. Configuring an OpenSSH Server
18.4.1. Requiring SSH for Remote Connections
18.5. OpenSSH Configuration Files
18.6. Configuring an OpenSSH Client
18.6.1. Using the ssh Command
18.6.2. Using the scp Command
18.6.3. Using the sftp Command
18.7. More Than a Secure Shell
18.7.1. X11 Forwarding
18.7.2. Port Forwarding
18.7.3. Generating Key Pairs
18.8. Additional Resources
18.8.1. Installed Documentation
18.8.2. Useful Websites
SSH™ (or Secure SHell) is a protocol which facilitates secure communications between two systems using a client/server architecture and allows users to log into server host systems remotely. Unlike other remote communication protocols, such as FTP or Telnet, SSH encrypts the login session, rendering the connection difficult for intruders to collect unencrypted passwords.
SSH is designed to replace older, less secure terminal applications used to log into remote hosts, such as telnet or rsh. A related program called scp replaces older programs designed to copy files between hosts, such as rcp. Because these older applications do not encrypt passwords transmitted between the client and the server, avoid them whenever possible. Using secure methods to log into remote systems decreases the risks for both the client system and the remote host.

18.1. Features of SSH

The SSH protocol provides the following safeguards:
Because the SSH protocol encrypts everything it sends and receives, it can be used to secure otherwise insecure protocols. Using a technique called port forwarding, an SSH server can become a conduit to securing otherwise insecure protocols, like POP, and increasing overall system and data security.
The OpenSSH server and client can also be configured to create a tunnel similar to a virtual private network for traffic between server and client machines.
Finally, OpenSSH servers and clients can be configured to authenticate using the GSSAPI implementation of the Kerberos network authentication protocol. For more information on configuring Kerberos authentication services, refer to Section 43.6, “Kerberos”.
Red Hat Enterprise Linux includes the general OpenSSH package (openssh) as well as the OpenSSH server (openssh-server) and client (openssh-clients) packages. Note, the OpenSSH packages require the OpenSSL package (openssl) which installs several important cryptographic libraries, enabling OpenSSH to provide encrypted communications.

18.1.1. Why Use SSH?

Nefarious computer users have a variety of tools at their disposal enabling them to disrupt, intercept, and re-route network traffic in an effort to gain access to a system. In general terms, these threats can be categorized as follows:
Both techniques intercept potentially sensitive information and, if the interception is made for hostile reasons, the results can be disastrous.
If SSH is used for remote shell login and file copying, these security threats can be greatly diminished. This is because the SSH client and server use digital signatures to verify their identity. Additionally, all communication between the client and server systems is encrypted. Attempts to spoof the identity of either side of a communication does not work, since each packet is encrypted using a key known only by the local and remote systems.


[5] X11 refers to the X11R7 windowing display system, traditionally referred to as the X Window System or X. Red Hat Enterprise Linux includes X11R7, an open source X Window System.

[6] DNS poisoning occurs when an intruder cracks a DNS server, pointing client systems to a maliciously duplicated host.

[7] IP spoofing occurs when an intruder sends network packets which falsely appear to be from a trusted host on the network.