Installation guide

Chapter 9.
OpenSSH
OpenSSH is a free, open source implementation of the SSH (Secure SHell) protocols. It re-
places telnet, ftp, rlogin, rsh, and rcp with secure, encrypted network connectivity tools.
OpenSSH supports versions 1.3, 1.5, and 2 of the SSH protocol. Since OpenSSH version 2.9,
the default protocol is version 2, which uses RSA keys as the default.
9.1. Why Use OpenSSH?
If you use OpenSSH tools, you are enhancing the security of your machine. All commu-
nications using OpenSSH tools, including passwords, are encrypted. Telnet and ftp use
plaintext passwords and send all information unencrypted. The information can be inter-
cepted, the passwords can be retrieved, and then your system can be compromised by an
unauthorized person logging in to your system using one of the intercepted passwords. The
OpenSSH set of utilities should be used whenever possible to avoid these security problems.
Another reason to use OpenSSH is that it automatically forwards the DISPLAY variable to
the client machine. In other words, if you are running the X Window System on your local
machine, and you log in to a remote machine using the ssh command, when you execute a
program on the remote machine that requires X, it will be displayed on your local machine.
This is convenient if you prefer graphical system administration tools but do not always
have physical access to your server.
9.2. Configuring an OpenSSH Server
To run an OpenSSH server, you must first make sure that you have the proper RPM packages
installed. The openssh-server package is required and depends on the openssh package.
Both of these packages are included in Red Hat Linux 7.3.
The OpenSSH daemon uses the configuration file /etc/ssh/sshd_config. The default con-
figuration file installed with Red Hat Linux 7.3 should be sufficient for most purposes. If you
want to configure the daemon in ways not provided by the default sshd_config, read the
sshd man page for a list of the keywords that can be defined in the configuration file.
To start the OpenSSH service, use the command /sbin/service sshd start. To stop the
OpenSSH server, use the command /sbin/service sshd stop. If you want the daemon to
start automatically at boot time, see Chapter 8 for information on how to manage services.
9.3. Configuring an OpenSSH Client
To connect to an OpenSSH server from a client machine, you must have the openssh-
clients and openssh packages installed on the client machine.
9.3.1. Using the ssh Command
The ssh command is a secure replacement for the rlogin, rsh, and telnet commands. It
allows you to log in to and execute commands on a remote machine.
Logging in to a remote machine with ssh is similar to using telnet. To log in to a remote
machine named penguin.example.net, type the following command at a shell prompt: