DropVPS Team
Writer: John hens
How to setup ssh key for github

Table of Contents
Setting up an SSH key for GitHub allows you to securely connect your local machine to your GitHub account without entering your username and password every time.
Step 1: Check for Existing SSH Keys
Before creating a new SSH key, check if you already have one on your system. This helps prevent overwriting existing keys.
ls -al ~/.ssh
Step 2: Generate a New SSH Key
Create a new SSH key using the ssh-keygen command. Use a secure email associated with your GitHub account.
ssh-keygen -t ed25519 -C "[email protected]"
Step 3: Start the SSH Agent
Starting the SSH agent allows your system to manage SSH keys efficiently, enabling secure authentication with GitHub without entering your password repeatedly.
eval "$(ssh-agent -s)"
ssh-add ~/.ssh/id_ed25519
Step 4: Add SSH Key to GitHub
Adding your SSH public key to GitHub links your local machine to your account, allowing secure, password-free authentication for repository operations.
cat ~/.ssh/id_ed25519.pub
Step 5: Test SSH Connection
Testing the SSH connection ensures that your key is correctly configured and GitHub recognizes your machine, allowing secure and seamless repository access.
ssh -T [email protected]