Setting Up SSH Keys on a New Installation

New installations often require setting up SSH keys. Here’s a quick guide on how I configured my new computer with existing SSH keys that were already generated and installed on a remote server.

Step 1: Copy the Private Key

First, navigate to the SSH directory:

cd ~/.ssh/

Step 2: Set the Correct Access Privileges

It’s important to set the correct read and write permissions for your private key:

chmod 700 ~/.ssh/id_rsa

Step 3: Add the SSH Key to the SSH Agent

After placing the private key in the correct folder, add it to the SSH agent using the built-in ssh-add function:

ssh-add ~/.ssh/id_rsa

Step 4: Connect to the Remote Server

Now you’re ready to connect:

Have fun!


Thanks for reading!
Follow me on Twitter for more updates.

Sources