27 August 2021
Laurens Gregoir
7285 Views
What you need is the following
- Debian with SSH enabled and sudo permissions
- Unifi Controller installed
- Valid certificates (yourCertificate.cert, yourPrivateKey.key, yourCA.crt)
- Winscp
- Putty
How to
- Open WinSCP and connect to your Unifi controller
- Upload your certs (yourCertificate.cert, yourPrivateKey.key, yourCA.crt) to your home folder
- Logon to your Unifi controller via SSH
- Run the following command to convert your certificate to a PKCS12
sudo openssl pkcs12 -export -in yourCertificate.cert -inkey yourPrivateKey.key -out yourNewCertName.p12 -name unifi -CAfile "yourCA.crt" -caname root -password pass:aircontrolenterprise
- Copy your newly converted PKCS12 certificate
sudo cp yourNewCertName.p12 /etc/ssl/private/
- Bind your newly copied PKCS12 certificate to the Unifi services
sudo keytool -importkeystore -deststorepass aircontrolenterprise -destkeypass aircontrolenterprise -destkeystore /usr/lib/unifi/data/keystore -srckeystore /etc/ssl/private/yourNewCertName.p12 -srcstoretype PKCS12 -srcstorepass aircontrolenterprise -alias unifi
- Restart the Unifi services (or reboot your server)
sudo /etc/init.d/unifi restart
Loading Comments...