Keys

Copy ssh keys without ssh-copy-id

I ran into this issue today so I thought that i would put a solution that I found on here. If you ever run into a situation in which you need to copy your ssh keys to another box but you dont have the handy dandy ssh-copy-id tool, the following one liner should work. Check out this oracle web page for more info.

cat ~/.ssh/id_rsa.pub | ssh <USER>@<IP> 'cat >> .ssh/authorized_keys && echo "Done"'

Pull public keys from Github url

If you ever want a simple way to pull your public keys from Github so that you can use your safely stored ssh private keys where you need them.

curl https://github.com/[USERNAME].keys

This command will put it in your authorized_keys file which will actually allow you to use them in ssh.

curl https://github.com/[USERNAME].keys | tee -a ~/.ssh/authorized_keys