setting up ssh keys for github and bitbucket

26 May 2022

setting up ssh keys for github and bitbucket
setting up ssh keys for github and bitbucket

Generating a new SSH key for Github

01echo "Generating a new SSH key for Github (private)"
02ssh-keygen -t ed25519 -C "<insert email>" -f ~/.ssh/daren_github_private
03eval "$(ssh-agent -s)"
04touch ~/.ssh/config
05printf "# Default hostname\n Host github.com\n Hostname github.com\n AddKeysToAgent yes\n UseKeychain yes\n IdentityFile ~/.ssh/daren_github_private" | tee ~/.ssh/config
06ssh-add -K ~/.ssh/daren_github_private
07echo "run 'pbcopy < ~/.ssh/daren_github_private.pub' and paste that into Github"
typescript

If you use a new host or something like `bitbucket.org-clientname` as `host`. You need to add it to your ssh.

ssh -T git@bitbucket.org-clientname