It dude's blog
Little lifehack for MacOS users.
Just add this code into your ~/.profile file and you will have terminal shortcut for copy into clipboard your SSH key.
alias ssh.key='cat ~/.ssh/id_rsa.pub | pbcopy; echo SSH PubKey copied to Clipboard'
After this you can use this alias as any program in terminal.
@dude /WWW# ssh.key SSH PubKey copied to Clipboard @dude /WWW#
Enjoy!
PS: if you use any Linux/FreeBSD distributions and made same lifehack for them, you can share in comments your code. Cheers, dude.
Related
One Response to Copy your public SSH key to clipboard
Leave a Reply Cancel reply
Categories
Projects
Subscribe to new posts by email
Archives
I can do on my Cygwin session in Windows:
$ cp ~/.ssh/id_rsa.pub /dev/clipboard
So, aliases are exist in cywin too :) Don’t be so boring apple-dude!