Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
alias cpkey='cat <(cat ~/.ssh/id_rsa.pub | xargs echo -n) <(printf " $USER") | pbcopy'
cpkey is what I use to copy my public key to the clipboard on my Mac. Use xsel or xclip if you don't have pbcopy. -
@magicMirror Some machines don't put the username after the key, so I had to add it in myself here. If yours does, you can leave out the printf.
As for the two cats, the first one joins the key with the username. The second one is used to strip newlines from the end of the file.
Angry programmer:
YOU WANT A PUBLIC KEY?
YOU WANT A PUBLIC KEY?
*smashes keyboard*
THERE'S YOUR PUBLIC KEY
undefined
angry security