sshkey_utilities

contributions requested
Utility functions for manipulating ssh keys

10,399 downloads

10,160 latest version

3.9 quality score

Support the Puppet Community by contributing to this module

You are welcome to contribute to this module by suggesting new features, currency updates, or fixes. Every contribution is valuable to help ensure that the module remains compatible with the latest Puppet versions and continues to meet community needs. Complete the following steps:

  1. Review the module’s contribution guidelines and any licenses. Ensure that your planned contribution aligns with the author’s standards and any legal requirements.
  2. Fork the repository on GitHub, make changes on a branch of your fork, and submit a pull request. The pull request must clearly document your proposed change.

For questions about updating the module, contact the module’s author.

Version information

  • 0.0.2 (latest)
  • 0.0.1
released Nov 9th 2013

Start using this module

  • r10k or Code Manager
  • Bolt
  • Manual installation
  • Direct download

Add this module to your Puppetfile:

mod 'bobtfish-sshkey_utilities', '0.0.2'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add bobtfish-sshkey_utilities
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install bobtfish-sshkey_utilities --version 0.0.2

Direct download is not typically how you would use a Puppet module to manage your infrastructure, but you may want to download the module in order to inspect the code.

Download

Documentation

bobtfish/sshkey_utilities — version 0.0.2 Nov 9th 2013

#sshkey_utilities

[Build Status

####Table of Contents

  1. Overview
  2. Reference - Functions included
  3. Limitations - OS compatibility, etc.
  4. Development - Guide for contributing to the module

##Overview

Provides funcions for manipulating ssh private and public keys from strings.

If you want to work on ssh keys in files then you can use the built in file() function to read them in, or my enhanced better_file module

##Reference

sshkey_fingerprint_from_public_key

Takes the public key text as a parameter and returns the key fingerprint.

For example:

$public_key = file('/etc/ssh/host_rsa_key.pub')
$fingerprint = sshkey_fingerprint_from_public_key($public_key)

sshkey_public_key_from_private_key

Generates and returns the public key corresponding to a given private key, the text of which should be supllied as a parameter.

The private key must not have a passphrase.

For example:

$private_key = file('/etc/ssh/host_rsa_key')
$public_key = sshkey_public_key_from_private_key($private_key)

##Limitations

This module should be compatible with any POSIX system which ships a 'setsid' command.

If your unix doesn't (coughApplecough) then see here: https://github.com/jerrykuch/ersatz-setsid

##Development

Patches welcome! Please send pull requests or suggestions on github.