Question
Copy SSH key to clipboard
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
×These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
×You can also use xclip (assumes you’re running a Debian based distro):
$ sudo apt-get install xclip
# Downloads and installs xclip. If you don't have `apt-get`, you might need to use another installer (like `yum`)
$ xclip -sel clip < ~/.ssh/id_rsa.pub
# Copies the contents of the id_rsa.pub file to your clipboard
Credit goes to github.
Hello, all
If you haven’t installed xclip or pbcopy you can simply print the output of the ssh key file and then copy it to your github account as per the previous suggestions:
cat ~/.ssh/id_rsa.pub
You can also check github docs for more information:
Hope that this helps!
Regards,
Alex
By this command, in your terminal, you can copy your ssh key to your clipboard:
pbcopy < ~/.ssh/id_rsa.pub