CFEngine Homepage
  • Home
  • Guide
  • CFEngine Enterprise
  • Examples
  • Reference
  • Download
    • Introduction and System Overview
    • Latest Release
    • Installation and Configuration
    • Writing and Serving Policy
    • Reporting
    • Special Topics
    • FAQ
      • What is CFEngine?
      • How does CFEngine work?
      • Why knowledge management?
      • Requesting a CFEngine Enterprise License
      • Uninstalling/Reinstalling
      • Agent output email
      • Debugging Mission Portal
      • Debugging Slow Queries
      • Enterprise Report Filtering
      • Enterprise Reporting database
      • Enterprise report collection
      • How can I tell what Classes and Variables are defined?
      • How do I find the public key for a given host
      • How do I fix trust after an IP change?
      • How do I fix undefined body errors?
      • How do I integrate custom policy?
      • How do I pass a data type variable?
      • Manual Execution
      • Mustache templating
      • Unable to log into Mission Portal
      • Users
      • What is promise locking?
      • Why are remote agents not updating?
      • Why are some files inside masterfiles not being updated/distributed?
      • Why does cfengine install into /var/cfengine instead of following the FHS?
      • Bootstrapping
      • What did cfengine do?
    • External resources
  • Guide
  • FAQ
Table of Contents

How do I find the public key for a given host

Table of Contents

Trying to locate the public key for a host on your hub in order to validate trust? Use this snippet to figure out which public key file in /var/cfengine/ppkeys matches a given host.

# KEY="SHA=31bcb32950d8b91ffdfca85bca71364ec8f67c93246e3617c3a49af58363c4a1"
# for each in $(ls /var/cfengine/ppkeys/*.pub); do
 if [ "$(cf-key -n -p ${each})" = "$KEY" ]; then
  echo "Found KEY in $each";
 fi
done
  • faq
  • cf-key
Download all CFEngine documentation for offline reading.


This documentation is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.

See our general information on licenses and terms and conditions.

Updated: 02 December 2022 from [markdown source] .

CFEngine

470 Ramona Street,

Palo Alto, CA 94301

Phone: +1 650 560-4888

Contact Us

Left Menu Go to Top Table of Content