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. To generate an RSA key pair to work with version 2 of the protocol, type the following command at a shell prompt. Accept the default file location of. Enter a passphrase different from your account password and confirm it by entering it again. The public key is written to. The private key is written to. Never distribute your private key to anyone. Change the permissions of the directory using the following command. Copy the contents of. into the file. on the machine to which you want to connect. If the file. exist, append the contents of the file. to the file. on the other machine. Change the permissions of the authorized_keys file using the following command. If you are running GNOME or are running in a graphical desktop with GTK2+ libraries installed, skip to Section 18.7.3.4, “Configuring ssh-agent with a GUI”. If you are not running the X Window System, skip to Section 18.7.3.5, “Configuring ssh-agent. Prev 18.7.3. Generating Key Pairs. Next 18.7.3.2. Generating a DSA Key Pair for Version 2. Note: This documentation is provided by Red Hat®, Inc. and is released via the Open Publication License. The copyright holder has added the further requirement that Distribution of substantively modified versions of this document is prohibited without the explicit permission of the copyright holder . The CentOS project redistributes these original works (in their unmodified form) as a reference for CentOS-5 because CentOS-5 is built from publicly available, open source SRPMS. The documentation is unmodified to be compliant with upstream distribution policy. Neither CentOS-5 nor the CentOS Project are in any way affiliated with or sponsored by Red Hat®, Inc.
PREVIOUS NEXT