112 words
1 minutes
π How to Generate Your Own SSH Key Pair

π¦ Generate SSH Key Pair
Open your terminal and run:
For modern ED25519 key (recommended):
ssh-keygen -t ed25519 -C "[email protected]"
Or for RSA (older systems):
ssh-keygen -t rsa -b 4096 -C "[email protected]"
Then follow these steps:
- Location prompt β Press
Enter
to save to default:~/.ssh/id_ed25519
orid_rsa
- Passphrase (optional) β Add a secure passphrase or press
Enter
to skip
π Your Key Files
- Private Key:
~/.ssh/id_ed25519
(keep this secure) - Public Key:
~/.ssh/id_ed25519.pub
(you share this with servers)
π Add SSH Key to Your Agent
eval "$(ssh-agent -s)"
ssh-add ~/.ssh/id_ed25519
π οΈ Add Public Key to GitHub/GitLab
-
Copy the key:
cat ~/.ssh/id_ed25519.pub
-
Go to your platformβs SSH Keys settings and paste it there
π Test Your Connection
ssh -T [email protected]
NOTEReplace
github.com
with your service provider (e.g.,gitlab.com
, your server IP, etc.)
π How to Generate Your Own SSH Key Pair
https://www.itsnooblk.com/posts/how-generate-ssh-keypair/