Skip to content

Instantly share code, notes, and snippets.

@nask0
Forked from hrdtbs/index.md
Created October 13, 2022 12:25
Show Gist options
  • Save nask0/f4b3a3f5e2120130c28ac84b9a923114 to your computer and use it in GitHub Desktop.
Save nask0/f4b3a3f5e2120130c28ac84b9a923114 to your computer and use it in GitHub Desktop.
Connect to Github with ED25519

Connect to github with ED25519

2017/08/09 MacOS

Check SSH key

$ ls -al ~/.ssh

ls

  • -a : show all file
  • -l : show file details

Generate SSH key

$ cd ~/.ssh
$ ssh-keygen -t ed25519 -C "your-email@example.com"

ssh-keygen

  • -t : key type
  • -f : file name to store the key
  • -b : key bit number case ED25519: Fixed
  • -N : new pass pharase
  • -C : add new comment

Add to SSH agent

$ eval "$(ssh-agent -s)"
$ ssh-add -K ~/.ssh/id_ed25519

ssh-add

  • -K : key is registered in the key chain store and it is automatically called when the terminal is activated
  • -l : show list of registered keys

Register SSH Key in GitHub account

$ pbcopy < ~/.ssh/id_ed25519.pub

Paste here

Check

ssh -T git@github.com
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment