Creating an SSH Key
> ssh-keygen -t ed25519 -C "your_email@example.com"
... see above link
Adding your SSH key for Login without Password
In order to login to another machine over ssh without requiring a password, we can add the public ssh key to the server's list of authorized keys.
For each user:
- they should generate (on their local machine) their keypair using
ssh-keygen -t rsa
(thersa
can be replaced withdsa
orrsa1
too, though those options are not recommended). - they need to put the contents of their public key (
id_rsa.pub
) into~/.ssh/authorized_keys
on the server being logged into.
Adding your key to Github
Navigate to Settings → SSH and GPG keys. Click New
Give the keys a title and then past the contents of ~/.ssh/id_ed25519.pub into the keys input box and click Add SSH Key.
References
Reference | URL |
---|---|
Generating a new SSH key and adding it to the ssh-agent | https://docs.github.com/en/github/authenticating-to-github/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent |
Connecting to GitHub with SSH | https://docs.github.com/en/github/authenticating-to-github/connecting-to-github-with-ssh |