There are multiple algorithms available to generate the SSH("Secure Shell") keys
ssh-keygen -t rsa -b 4096- Old algorithm not recommended to use.
ssh-keygen -t dsa- Old US government Digital Signature Algorithm.
ssh-keygen -t ecdsa -b 521- New Digital Signature Algorithm standardized by the US government
ssh-keygen -t ed25519- New algorithm added in OpenSSH.
- Recommended by github.com
in the above commands
-t means type
-b means no of bits
-rsa, dsa, ecdsa, ed25519 are algorithms
Step 1:
cd ~/.ssh
Step 2:
ssh-keygen -t ed25519 -C "youremail@domain.com"
Step 3:
eval "$(ssh-agent -s)" or eval `ssh-agent`
Step 4:
ssh-add dshyam2109 (<- your key name)
Step 5
Copy your public key from above step and paste it in the GitHub -> Settings as shown in below screenshot.
Now you can successfully access your repositories using SSH key.