Setting up SSH ensures secure communication between your computer and GitHub. Follow these steps to configure SSH:
Open your terminal and run:
ls -al ~/.sshNext step is to generate an ssh key by running the following command
ssh-keygen -t rsa -b 4096 -C "your_email@example.com"replace your_email@example.com with your email address used to register GitHub
Run the following command to to start the ssh-agent and add your SSH key:
eval "$(ssh-agent -s)"
ssh-add ~/.ssh/id_rsaCopy your SSH key to your clipboard:
cat ~/.ssh/id_rsa.pubGo to your GitHub SSH settings and add a new SSH key. Paste your key and save it.
Verify your connection with:
ssh -T git@github.comYou should see a success message if everything is set up correctly. 🎉
You're now ready to connect to GitHub using SSH!