Copy your SSH keys from Github or Gitlab

Last update: 5/22/2022

This is a great alternative if you are not using your primary device at the moment or can't use ssh-copy-id. Just replace <username> by your Gitab or Github user name.

Github

curl https://github.com/<username>.keys | tee -a ~/.ssh/authorized_keys

Gitlab

curl https://gitlab.com/<username>.keys | tee -a ~/.ssh/authorized_keys