PKI

Automating pfSense Key Export

So having keys via LetsEncrypt is pretty cool given the fact that they’re free, but unlike other certs these are only good for about 90 days, and while manually moving keys over a couple times a year is not the most annoying thing in the world, I’m pretty lazy so i like to automate trivial tasks as much as possible. I’m doing this with the assumption that you’ve already set up your certs using the pfSense ACME client so what we’re going to be doing is as simple as using rsync to ensure that these files are always up to date.

Read more >

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