Open a terminal or command prompt
Check for existing SSH keys with `ls -al ~/.ssh`
Generate a new SSH key with `ssh-keygen -t ed25519 -C “your_email@example.com”`
Press Enter to accept the default file location
Enter a passphrase if prompted
Start the SSH agent with `eval “$(ssh-agent -s)”`
Add your private key to the SSH agent with `ssh-add ~/.ssh/id_ed25519`
Copy the public key with `cat ~/.ssh/id_ed25519.pub`
Add the public key to your GitHub, GitLab, or server account
Test the SSH connection with `ssh -T git@github.com`
