Generate ssh key and connect linux to github
Connect linux console with github with ssh key.
Let’s start. Make sure you are logged in to your github account in your browser.
- Generate SSH key pair
1
ssh-keygen -t ed25519 -C "your_email@example.com"
Keep password empty so that don’t have to use password each time use ssh.
- Start the SSH agent:
1
eval "$(ssh-agent -s)"
- Add your SSH private key to the SSH agent:
1
ssh-add ~/.ssh/id_ed25519
- Show your SSH public key. And copy it.
1
cat ~/.ssh/id_ed25519.pub
Add Your SSH Public Key to Your GitHub Account
GitHub
→Settings
→SSH & GPG Keys
→New SSH key
→Paste Key
(Give title)- Test the SSH connection to Github
1
ssh -T git@github.com
This post is licensed under CC BY 4.0 by the author.