Creating an SSH Key

https://docs.github.com/en/github/authenticating-to-github/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent

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 (the rsa can be replaced with dsa or rsa1 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

  • No labels