get PBS certificate fingerprint from cli

ned

Renowned Member
Jan 26, 2015
113
2
83
My PBS server gets a new certificate every 3 months so I have to manually get the new fingerprint from the server and then import it to the PVE servers. My idea is to automate this process with Ansible. First step is to get the fingerprint from cli. This is my idea:

Bash:
proxmox-backup-manager cert info | grep Fingerprint | awk '{print $3}'

is there a better option?
 
Last edited:
is there a reason why the output is different for these 2 command below? letters are all caps when openssl is used.

Bash:
proxmox-backup-manager cert info | grep Fingerprint | awk '{print $3}'
openssl x509 -in /etc/proxmox-backup/proxy.pem -fingerprint -noout -sha256 | awk '{print $2}' | cut -f2 -d '='
 
You only need the fingerprint if you dont have a valid certificate, (e.g. it is self-signed) or your PBS is not resolvable via DNS (e.g. you added it via its IP address).

You mentioned a new certificate every 3 months, so I guess you are using a LetsEncrypt certificate for your domain? Then you dont have to use the fingerprint at all. Just input the FQDN of your PBS in the 'Server' field.
 
Also, you can update the PBS's fingerprint on the datacenter level as it will push it to all the PVE nodes in the cluster. I recently ran into this when I started using Let's Encrypt certs only to find out I don't need to worry about the fingerprint anymore.
 
  • Like
Reactions: metaphase
You only need the fingerprint if you dont have a valid certificate, (e.g. it is self-signed) or your PBS is not resolvable via DNS (e.g. you added it via its IP address).

You mentioned a new certificate every 3 months, so I guess you are using a LetsEncrypt certificate for your domain? Then you dont have to use the fingerprint at all. Just input the FQDN of your PBS in the 'Server' field.
Brilliant, I wasn't aware of this myself, thanks ;)

The GUI wording is a bit misleading. You only need to enter the fingerprint if you’re using a self-signed certificate (or connecting via IP). If your PBS has a valid CA-signed certificate (e.g. Let’s Encrypt or an internal root CA that’s trusted on your PVE nodes) and you connect via FQDN, then you don’t need to configure the fingerprint at all — Proxmox will validate the certificate normally.

I’d suggest updating the fingerprint field description in the storage dialog to something like:
Required only for self-signed certs or IP access. Leave empty if using a trusted CA + FQDN.