-
Notifications
You must be signed in to change notification settings - Fork 1
SSH Cheat Sheet
River News edited this page Dec 29, 2021
·
4 revisions
Quick steps
- Generate a key (refer to SSH official website for what
ed25519
is, what algorithm to choose, what is other arg options):ssh-keygen -t ed25519 -C [email protected]
. - For now on refer to GitHub instruction. Run
eval "$(ssh-agent -s)"
. - Create SSH config file if not yet created at
~/.ssh/config
. Make sure to change~/.ssh/id_ed25519
if using another file name in step 1.
Host *
AddKeysToAgent yes
UseKeychain yes
IdentityFile ~/.ssh/id_ed25519
- Adding Apple support:
ssh-add -K ~/.ssh/id_ed25519
(macOS Monterey suggest you to usessh-add --apple-use-keychain ~/.ssh/id_ed25519
instead), make sure to change the file name. - Ready to copy paste the SSH key on GitHub, or any website or client you're going to use SSH for auth / git clone. Run
pbcopy < ~/.ssh/id_ed25519.pub
, make sure to change the file name. - Paste to add SSH key on the website / client.
You should now be able to git clone, etc.