Copying your ssh key

Since I’m frequently trying out new OSes courtesy of VirtualBox, my ssh key changes a fair bit. So I keep forgetting the xclip command, and I got tired of Google-ing “git xclip” so I’ve decided to repost snippets of this article here:

$ sudo apt-get install xclip
$ xclip -sel clip < ~/.ssh/id_rsa.pub

Now use Ctrl+V to paste the (secret) key into your Git hosting provider; e.g. the very excellent Github.

Advertisements