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.
curl https://github.com/<username>.keys | tee -a ~/.ssh/authorized_keys
curl https://gitlab.com/<username>.keys | tee -a ~/.ssh/authorized_keys