Copy SSH Public Key to Clipboard Written by Adam J. BaléePublished June 10, 2018March 18, 2019 Use the following command in terminal to copy your SSH public key to your clipboard on Mac or Linux. Be sure to swap out the path and file name with your own if necessary. cat ~/.ssh/id_rsa.pub | pbcopy Share onEmailXLinkedInFacebook