This guide explains how to generate an SSH key and set it up with GitHub for secure and fast access. To generate a new SSH key, run the command `ssh-keygen -t ed25519 -C "any comment"` in your terminal. Replace "any comment" with a descriptive label, like your email or a short label. You'll be prompted to choose where to save the key file and enter a passphrase to protect your key. Once the key generation process is complete, you'll see a confirmation message showing the key's fingerprint. To connect your SSH key with GitHub, you'll need to add the public key to your GitHub account. To do this, navigate to GitHub, go to Settings, and click on SSH and GPG keys. Click New SSH key, enter a title, and paste your key, then click Add SSH key to save it to your GitHub account. To test the connection, run the command `ssh -T git@github.com` and type yes to continue. If you see the message confirming your authentication, you've successfully set up SSH for GitHub.
dev.to
dev.to
