Red Hat ENTERPRISE LINUX 4 System Administration Manual page 218

Hide thumbs Also See for ENTERPRISE LINUX 4:
Table of Contents

Advertisement

Chapter 20. OpenSSH
Red Hat Enterprise Linux 4 uses SSH Protocol 2 and RSA keys by default.
Tip
If you reinstall and want to save your generated key pair, backup the .ssh directory in
your home directory. After reinstalling, copy this directory back to your home directory.
This process can be done for all users on your system, including root.
20.3.4.1. Generating an RSA Key Pair for Version 2
Use the following steps to generate an RSA key pair for version 2 of the SSH protocol. This is the
default starting with OpenSSH 2.9.
1. To generate an RSA key pair to work with version 2 of the protocol, type the following command at
a shell prompt:
ssh-keygen -t rsa
Accept the default file location of ~/.ssh/id_rsa. Enter a passphrase different from your
account password and confirm it by entering it again.
The public key is written to ~/.ssh/id_rsa.pub. The private key is written to ~/.ssh/id_rsa.
Never distribute your private key to anyone.
2. Change the permissions of the .ssh directory using the following command:
chmod 755 ~/.ssh
3. Copy the contents of ~/.ssh/id_rsa.pub into the file ~/.ssh/authorized_keys on the
machine to which you want to connect. If the file ~/.ssh/authorized_keys exist, append the
contents of the file ~/.ssh/id_rsa.pub to the file ~/.ssh/authorized_keys on the other
machine.
4. Change the permissions of the authorized_keys file using the following command:
chmod 644 ~/.ssh/authorized_keys
5. If you are running GNOME, skip to
you are not running the X Window System, skip to
20.3.4.2. Generating a DSA Key Pair for Version 2
Use the following steps to generate a DSA key pair for version 2 of the SSH Protocol.
1. To generate a DSA key pair to work with version 2 of the protocol, type the following command at
a shell prompt:
ssh-keygen -t dsa
Accept the default file location of ~/.ssh/id_dsa. Enter a passphrase different from your
account password and confirm it by entering it again.
200
Section 20.3.4.4, "Configuring ssh-agent with
Section 20.3.4.5, "Configuring
GNOME". If
ssh-agent".

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the ENTERPRISE LINUX 4 and is the answer not in the manual?

Table of Contents