January 3rd 2014 by Jessica Legner
Use this alias to copy your ssh key to the clipboard for easy retrieval (put it in ~/.bash_profile):
alias [name of alias]="cat [path to your id_rsa.pub] | pbcopy && echo 'Copied to clipboard.'"
Mine looks like this:
alias sshkey="cat ~/.ssh/id_rsa.pub | pbcopy && echo 'Copied to clipboard.'"
Any time you need your ssh key, just type sshkey, or whatever you decide to call it and paste the result wherever you need the key.