Tools for Let's Encrypt - Renewing certificates on one machine and importing on another, etc.
- Create SSH key pair
cd /root/.ssh/ ssh-keygen -t rsa -b 4096 -C [email protected] -f letsencrypt.domain.com
On pfSense server:
Add to /etc/rc.conf:
scponlyc_enable=YES
cd /usr/local/share/examples/scponly/
[2.4.4-RELEASE][[email protected]]/usr/local/share/examples/scponly: mkdir /home/le/dev [2.4.4-RELEASE][[email protected]]/usr/local/share/examples/scponly: cp -a /dev/null /home/le/dev/
[2.4.4-RELEASE][[email protected]]/usr/local/share/examples/scponly: ./setup_chroot.sh
Next we need to set the home directory for this scponly user. please note that the user's home directory MUST NOT be writeable by the scponly user. this is important so that the scponly user cannot subvert the .ssh configuration parameters.
for this reason, a writeable subdirectory will be created that the scponly user can write into.
-en Username to install [scponly] le -en home directory you wish to set for this user [/home/le]
-en name of the writeable subdirectory [incoming] domains
creating /home/le/domains directory for uploading files
Your platform (FreeBSD) does not have a platform specific setup script. This install script will attempt a best guess. If you perform customizations, please consider sending me your changes. Look to the templates in build_extras/arch.
- joe at sublimation dot org
please set the password for le: Changing local password for le New Password: Retype New Password: if you experience a warning with winscp regarding groups, please install the provided hacked out fake groups program into your chroot, like so: cp groups /home/le/bin/groups
mkdir /home/le/.ssh
root@letsencrypt:/etc/letsencrypt/archive/pfsense.domain.com# scp /root/.ssh/letsencrypt.domain.com.pub [email protected]:/home/le/.ssh/authorized_keys Password for [email protected]: letsencrypt.domain.com.pub 100% 756 1.4MB/s 00:00
Test the ability to scp in as the le user with thessh key:
root@letsencrypt:/etc/letsencrypt/archive/pfsense.domain.com# scp -i
/root/.ssh/letsencrypt.domain.com {cert,chain,privkey}5.pem [email protected]:domains/
cert5.pem 100% 1931 3.1MB/s 00:00
chain5.pem 100% 1647 2.9MB/s 00:00
privkey5.pem 100% 1704 3.0MB/s 00:00