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.
SSH
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"'
So i was trying to make a script that would automate SSL key exports from a BSD machine to another so I don’t have to go through the pain of doing it manually every time and i ran into the issue of me not being able to ssh-copy-id my files over but i keep running into the issue of it not being able to connect to my auth agent due to a lack of keys even though i generated them with ssh-keygen, nonetheless no matter what I did i kept getting met with: