Forge Home


Utility functions for manipulating ssh keys


9,523 latest version

3.9 quality score

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.



bobtfish/sshkey_utilities — version 0.0.2 Nov 9th 2013


[Build Status

####Table of Contents

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


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



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

For example:

$public_key = file('/etc/ssh/')
$fingerprint = sshkey_fingerprint_from_public_key($public_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)


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

If your unix doesn't (coughApplecough) then see here:


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