https://github.com/puppetlabs/puppetlabs-sshkeys
Puppet Labs SSH Public Keys
https://github.com/puppetlabs/puppetlabs-sshkeys
internal module
Last synced: 6 months ago
JSON representation
Puppet Labs SSH Public Keys
- Host: GitHub
- URL: https://github.com/puppetlabs/puppetlabs-sshkeys
- Owner: puppetlabs
- License: apache-2.0
- Created: 2011-12-28T18:19:34.000Z (almost 14 years ago)
- Default Branch: master
- Last Pushed: 2025-02-04T02:05:00.000Z (8 months ago)
- Last Synced: 2025-03-29T06:07:41.566Z (6 months ago)
- Topics: internal, module
- Language: Shell
- Homepage:
- Size: 977 KB
- Stars: 31
- Watchers: 162
- Forks: 71
- Open Issues: 5
-
Metadata Files:
- Readme: README.markdown
- License: LICENSE
Awesome Lists containing this project
README
# Puppet Labs SSH Keys
Puppet Labs engineers and technical people should add their SSH public keys to
the templates directory of this project. These keys are periodically copied to
our Delivery systems that are not managed by Puppet.# Usage
If a host is not being managed by Puppet, then SSH access can be granted using
this process.If the host has a cron that uses `/etc/cron.hourly/` then simply copy the
script into `/etc/cron.hourly/` like this:```bash
cd /etc/cron.hourly/
curl -O https://raw.githubusercontent.com/puppetlabs/puppetlabs-sshkeys/master/templates/scripts/manage_root_authorized_keys
chmod +x manage_root_authorized_keys
```If the cron on the system does not support `cron.hourly`, the following
crontab entry may be used.```bash
mkdir -p /usr/local/bin
cd /usr/local/bin
curl -O https://raw.githubusercontent.com/puppetlabs/puppetlabs-sshkeys/master/templates/scripts/manage_root_authorized_keys
chmod +x manage_root_authorized_keys
crontab -e
```The entry should look like:
```
# min hour dom month dow command
59 * * * * /usr/local/bin/manage_root_authorized_keys
```# Adding Keys
Keys should be added to the `templates/ssh/` directory of this repository.
Add your public key as `username.pub`, and then append it to `authorized_keys`.
This might look something like:```bash
# Be sure to replace SSHKEY_DIR and USERNAME with the correct values!
export SSHKEY_DIR=~/working/puppetlabs-sshkeys/templates/ssh
export USERNAME="username"cp ~/.ssh/id_rsa.pub ${SSHKEY_DIR}/${USERNAME}.pub
cat ${SSHKEY_DIR}/${USERNAME}.pub >> ${SSHKEY_DIR}/authorized_keys
```Once your pull request has been merged into the master branch, the keys will
automatically be copied to all of the hosts using this script.