While setting up the repositories on github or other services we encounter this very often.
We stuck when it comes to get a ssh key for mac terminal. Here i found a very quick solution to copy ssh public key to clipboard.
$ pbcopy < ~/.ssh/id_rsa.pub
This is a simple command which copies the ssh key to clipboard then paste it where ever you wanted.