Securely storing away the encryption keys

Let's now copy the two keys into the /etc/puppetlabs/puppet/eyaml directory and set up the appropriate permissions, giving the Puppet user ownership, and excluding all other users from being able to access the two keys:

$ mv -t /etc/puppetlabs/puppet/eyaml ./keys/*.pem$ chown -R puppet:puppet /etc/puppetlabs/puppet/eyaml$ chmod -R 0500 /etc/puppetlabs/puppet/eyaml$ chmod 0400 /etc/puppetlabs/puppet/eyaml/*.pem$ ls -lha /etc/puppetlabs/puppet/eyaml-r-------- 1 puppet puppet 1.7K Apr 25 08:08 private_key.pkcs7.pem-r-------- 1 puppet puppet 1.1K Apr 25 08:08 public_key.pkcs7.pem

Get Mastering Puppet 5 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.