Installation guide
100 Chapter 9. OpenSSH
2. Change the permissions of your .ssh directory using the command chmod 755
~/.ssh.
3. Copy the contents of ~/.ssh/id_dsa.pub to ~/.ssh/authorized_keys on the ma-
chine to which you want to connect. If the file ~/.ssh/authorized_keys does not
exist, you can copy the file ~/.ssh/id_dsa.pub to the file ~/.ssh/authorized_keys
on the other machine.
1
4. If you are running GNOME, skip to Section 9.3.4.4. If you are not running the X Win-
dow System, skip to Section 9.3.4.5.
9.3.4.2. Generating an RSA Key Pair for Version 2
Use the following steps to generate a RSA key pair for version 2 of the SSH protocol. This is
the default starting with OpenSSH 2.9.
1. To generate a 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.
1
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 your .ssh directory using the command chmod 755
~/.ssh.
3. Copy the contents of ~/.ssh/id_rsa.pub to ~/.ssh/authorized_keys on the ma-
chine to which you want to connect. If the file ~/.ssh/authorized_keys does not
exist, you can copy the file ~/.ssh/id_rsa.pub to the file ~/.ssh/authorized_keys
on the other machine.
1
4. If you are running GNOME, skip to Section 9.3.4.4. If you are not running the X Win-
dow System, skip to Section 9.3.4.5.
9.3.4.3. Generating an RSA Key Pair for Version 1.3 and 1.5
Use the following steps to generate an RSA key pair, which is used by version 1 of the SSH
Protocol. If you are only connecting between Red Hat Linux 7.3 systems, you do not need an
RSA version 1.3 or RSA version 1.5 key pair.
1. To generate an RSA (for version 1.3 and 1.5 protocol) key pair, type the following
command at a shell prompt:
ssh-keygen -t rsa1
1. The ~ stands for the home directory of the currently logged in user. See the Official Red Hat Linux
Getting Started Guide for more details.
1. The ~ stands for the home directory of the currently logged in user. See the Official Red Hat Linux
Getting Started Guide for more details.
1. The ~ stands for the home directory of the currently logged in user. See the Official Red Hat Linux
Getting Started Guide for more details.