{"id":15022804,"url":"https://github.com/voxpupuli/puppet-augeasproviders_ssh","last_synced_at":"2026-03-08T09:36:30.734Z","repository":{"uuid":"22636292","full_name":"voxpupuli/puppet-augeasproviders_ssh","owner":"voxpupuli","description":"Augeas-based ssh types and providers for Puppet ","archived":false,"fork":false,"pushed_at":"2024-04-12T11:15:10.000Z","size":316,"stargazers_count":7,"open_issues_count":17,"forks_count":31,"subscribers_count":43,"default_branch":"master","last_synced_at":"2024-04-13T21:20:06.548Z","etag":null,"topics":["augeas","augeasproviders","centos-puppet-module","configuration-files","debian-puppet-module","fedora-puppet-module","hacktoberfest","linux-puppet-module","oraclelinux-puppet-module","puppet","puppet-module","puppet-resources","redhat-puppet-module","ssh","ssh-keys","ssh-server","ubuntu-puppet-module"],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"google/python-fire","license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/voxpupuli.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":".github/CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null},"funding":{"open_collective":"vox-pupuli","github":"voxpupuli"}},"created_at":"2014-08-05T08:29:41.000Z","updated_at":"2024-04-15T06:31:44.147Z","dependencies_parsed_at":"2024-04-15T06:41:45.174Z","dependency_job_id":null,"html_url":"https://github.com/voxpupuli/puppet-augeasproviders_ssh","commit_stats":{"total_commits":157,"total_committers":21,"mean_commits":7.476190476190476,"dds":0.3821656050955414,"last_synced_commit":"5704675e07975dc0ccac4b1c2d9b6ef5bbec0c5a"},"previous_names":["voxpupuli/augeasproviders_ssh","hercules-team/augeasproviders_ssh"],"tags_count":19,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/voxpupuli%2Fpuppet-augeasproviders_ssh","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/voxpupuli%2Fpuppet-augeasproviders_ssh/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/voxpupuli%2Fpuppet-augeasproviders_ssh/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/voxpupuli%2Fpuppet-augeasproviders_ssh/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/voxpupuli","download_url":"https://codeload.github.com/voxpupuli/puppet-augeasproviders_ssh/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":196507048,"owners_count":13237736,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["augeas","augeasproviders","centos-puppet-module","configuration-files","debian-puppet-module","fedora-puppet-module","hacktoberfest","linux-puppet-module","oraclelinux-puppet-module","puppet","puppet-module","puppet-resources","redhat-puppet-module","ssh","ssh-keys","ssh-server","ubuntu-puppet-module"],"created_at":"2024-09-24T19:58:24.118Z","updated_at":"2025-10-24T14:30:36.100Z","avatar_url":"https://github.com/voxpupuli.png","language":"Ruby","funding_links":["https://opencollective.com/vox-pupuli","https://github.com/sponsors/voxpupuli"],"categories":[],"sub_categories":[],"readme":"# puppet-augeasproviders\\_ssh\n\n[![Build Status](https://github.com/voxpupuli/puppet-augeasproviders_ssh/workflows/CI/badge.svg)](https://github.com/voxpupuli/puppet-augeasproviders_ssh/actions?query=workflow%3ACI)\n[![Release](https://github.com/voxpupuli/puppet-augeasproviders_ssh/actions/workflows/release.yml/badge.svg)](https://github.com/voxpupuli/puppet-augeasproviders_ssh/actions/workflows/release.yml)\n[![Code Coverage](https://coveralls.io/repos/github/voxpupuli/puppet-augeasproviders_ssh/badge.svg?branch=master)](https://coveralls.io/github/voxpupuli/puppet-augeasproviders_ssh)\n[![Puppet Forge](https://img.shields.io/puppetforge/v/puppet/augeasproviders_ssh.svg)](https://forge.puppetlabs.com/puppet/augeasproviders_ssh)\n[![Puppet Forge - downloads](https://img.shields.io/puppetforge/dt/puppet/augeasproviders_ssh.svg)](https://forge.puppetlabs.com/puppet/augeasproviders_ssh)\n[![Puppet Forge - endorsement](https://img.shields.io/puppetforge/e/puppet/augeasproviders_ssh.svg)](https://forge.puppetlabs.com/puppet/augeasproviders_ssh)\n[![Puppet Forge - ssshs](https://img.shields.io/puppetforge/f/puppet/augeasproviders_ssh.svg)](https://forge.puppetlabs.com/puppet/augeasproviders_ssh)\n[![puppetmodule.info docs](http://www.puppetmodule.info/images/badge.png)](http://www.puppetmodule.info/m/puppet-augeasproviders_ssh)\n[![Apache-2 License](https://img.shields.io/github/license/voxpupuli/puppet-augeasproviders_ssh.svg)](LICENSE)\n[![Donated by Camptocamp](https://img.shields.io/badge/donated%20by-camptocamp-fb7047.svg)](#transfer-notice)\n\n\n# ssh: type/provider for ssh files for Puppet\n\nThis module provides a new type/provider for Puppet to read and modify ssh\nconfig files using the Augeas configuration library.\n\nThe advantage of using Augeas over the default Puppet `parsedfile`\nimplementations is that Augeas will go to great lengths to preserve file\nformatting and comments, while also failing safely when needed.\n\nThis provider will hide *all* of the Augeas commands etc., you don't need to\nknow anything about Augeas to make use of it.\n\n## Requirements\n\nEnsure both Augeas and ruby-augeas 0.3.0+ bindings are installed and working as\nnormal. Both are usually bundled in the puppet agent AIO packages from Puppet Inc.\n\nSee [Puppet/Augeas pre-requisites](http://docs.puppetlabs.com/guides/augeas.html#pre-requisites).\n\n## Installing\n\nThe module can be installed easily ([documentation](http://docs.puppetlabs.com/puppet/latest/reference/modules_installing.html)):\n\n```\npuppet module install puppet/augeasproviders_ssh\n```\n\nEnsure the module is present in your puppetmaster's own environment (it doesn't\nhave to use it) and that the master has pluginsync enabled.  Run the agent on\nthe puppetmaster to cause the custom types to be synced to its local libdir\n(`puppet master --configprint libdir`) and then restart the puppetmaster so it\nloads them.\n\n## Compatibility\n\n### Puppet versions\n\nIn theory. Puppet 2.7 is the minimal version. We currently (2022-08-29) we test against Puppet 6 and 7.\nCheck the Puppet version range in metadata.json for supported versions.\n\n### Augeas versions\n\nAugeas Versions           | 0.10.0  | 1.0.0   | 1.1.0   | 1.2.0   |\n:-------------------------|:-------:|:-------:|:-------:|:-------:|\n**FEATURES**              |\ncase-insensitive keys     | no      | **yes** | **yes** | **yes** |\n**PROVIDERS**             |\nssh\\_config               | **yes** | **yes** | **yes** | **yes** |\nsshd\\_config              | **yes** | **yes** | **yes** | **yes** |\nsshd\\_config\\_match       | **yes** | **yes** | **yes** | **yes** |\nsshd\\_config\\_subsystem   | **yes** | **yes** | **yes** | **yes** |\nsshkey                    | **yes** | **yes** | **yes** | **yes** |\n\n## Documentation and examples\n\nType documentation can be generated with `puppet doc -r type` or viewed on the\n[Puppet Forge page](http://forge.puppetlabs.com/herculesteam/augeasproviders_ssh).\n\n### ssh_config provider\n\n#### manage simple entry\n\n    ssh_config { \"ForwardAgent\":\n      ensure =\u003e present,\n      value  =\u003e \"yes\",\n    }\n\n#### manage array entry\n\n    ssh_config { \"SendEnv\":\n      ensure =\u003e present,\n      value  =\u003e [\"LC_*\", \"LANG\"],\n    }\n\n#### manage entry for a specific host\n\n    ssh_config { \"X11Forwarding\":\n      ensure    =\u003e present,\n      host      =\u003e \"example.net\",\n      value     =\u003e \"yes\",\n    }\n\n#### manage entries with same name for different hosts\n\n    ssh_config { \"ForwardAgent global\":\n      ensure =\u003e present,\n      key    =\u003e \"ForwardAgent\",\n      value  =\u003e \"no\",\n    }\n\n    ssh_config { \"ForwardAgent on example.net\":\n      ensure    =\u003e present,\n      key       =\u003e \"ForwardAgent\",\n      host      =\u003e \"example.net\",\n      value     =\u003e \"yes\",\n    }\n\n#### manage entry with a comment\n\n    ssh_config { \"ForwardAgent\":\n      ensure  =\u003e present,\n      key     =\u003e \"ForwardAgent\",\n      value   =\u003e \"no\",\n      comment =\u003e \"Do not forward\",\n    }\n\n#### delete entry\n\n    ssh_config { \"HashKnownHosts\":\n      ensure =\u003e absent,\n    }\n\n    ssh_config { \"BatchMode\":\n      ensure    =\u003e absent,\n      host      =\u003e \"example.net\",\n    }\n\n#### manage entry in another ssh_config location\n\n    ssh_config { \"CheckHostIP\":\n      ensure =\u003e present,\n      value  =\u003e \"yes\",\n      target =\u003e \"/etc/ssh/another_sshd_config\",\n    }\n\n### sshd_config provider\n\n#### manage simple entry\n\n    sshd_config { \"PermitRootLogin\":\n      ensure =\u003e present,\n      value  =\u003e \"yes\",\n    }\n\n#### manage array entry\n\n    sshd_config { \"AllowGroups\":\n      ensure =\u003e present,\n      value  =\u003e [\"sshgroups\", \"admins\"],\n    }\n\n#### append to array entry\n\n    sshd_config { \"AllowGroups\":\n      ensure       =\u003e present,\n      value        =\u003e [\"sshgroups\", \"admins\"],\n      array_append =\u003e true,\n    }\n\n#### manage entry in a Match block\n\n    sshd_config { \"X11Forwarding\":\n      ensure    =\u003e present,\n      condition =\u003e \"Host foo User root\",\n      value     =\u003e \"yes\",\n    }\n\n    sshd_config { \"AllowAgentForwarding\":\n      ensure    =\u003e present,\n      condition =\u003e \"Host *.example.net\",\n      value     =\u003e \"yes\",\n    }\n\n#### manage entries with same name in different blocks\n\n    sshd_config { \"X11Forwarding global\":\n      ensure =\u003e present,\n      key    =\u003e \"X11Forwarding\",\n      value  =\u003e \"no\",\n    }\n\n    sshd_config { \"X11Forwarding foo\":\n      ensure    =\u003e present,\n      key       =\u003e \"X11Forwarding\",\n      condition =\u003e \"User foo\",\n      value     =\u003e \"yes\",\n    }\n\n    sshd_config { \"X11Forwarding root\":\n      ensure    =\u003e present,\n      key       =\u003e \"X11Forwarding\",\n      condition =\u003e \"User root\",\n      value     =\u003e \"no\",\n    }\n\n#### manage entry with a comment\n\n    sshd_config { \"X11Forwarding\":\n      ensure  =\u003e present,\n      key     =\u003e \"X11Forwarding\",\n      value   =\u003e \"no\",\n      comment =\u003e \"No X11\",\n    }\n\n#### delete entry\n\n    sshd_config { \"PermitRootLogin\":\n      ensure =\u003e absent,\n    }\n\n    sshd_config { \"AllowAgentForwarding\":\n      ensure    =\u003e absent,\n      condition =\u003e \"Host *.example.net User *\",\n    }\n\n#### manage entry in another sshd_config location\n\n    sshd_config { \"PermitRootLogin\":\n      ensure =\u003e present,\n      value  =\u003e \"yes\",\n      target =\u003e \"/etc/ssh/another_sshd_config\",\n    }\n\n### sshd_config_match provider\n\n#### manage entry\n\n    sshd_config_match { \"Host *.example.net\":\n      ensure =\u003e present,\n    }\n\n#### manage entry with position\n\n    sshd_config_match { \"Host *.example.net\":\n      ensure   =\u003e present,\n      position =\u003e \"before first match\",\n    }\n\n    sshd_config_match { \"User foo\":\n      ensure   =\u003e present,\n      position =\u003e \"after Host *.example.net\",\n    }\n\n#### manage entry with a comment\n\n    sshd_config_match { \"Host *.example.net\":\n      ensure  =\u003e present,\n      comment =\u003e \"Example network\",\n    }\n\n#### delete entry\n\n    sshd_config_match { \"User foo Host *.example.net\":\n      ensure =\u003e absent,\n    }\n\n#### manage entry in another sshd_config location\n\n    sshd_config_match { \"Host *.example.net\":\n      ensure =\u003e present,\n      target =\u003e \"/etc/ssh/another_sshd_config\",\n    }\n\n### sshd_config_subsystem provider\n\n#### manage entry\n\n    sshd_config_subsystem { \"sftp\":\n      ensure  =\u003e present,\n      command =\u003e \"/usr/lib/openssh/sftp-server\",\n    }\n\n#### manage entry with a comment\n\n    sshd_config_subsystem { \"sftp\":\n      ensure  =\u003e present,\n      command =\u003e \"/usr/lib/openssh/sftp-server\",\n      comment =\u003e \"SFTP sub\",\n    }\n\n#### delete entry\n\n    sshd_config_subsystem { \"sftp\":\n      ensure =\u003e absent,\n    }\n\n#### manage entry in another sshd_config location\n\n    sshd_config_subsystem { \"sftp\":\n      ensure  =\u003e present,\n      command =\u003e \"/usr/lib/openssh/sftp-server\",\n      target  =\u003e \"/etc/ssh/another_sshd_config\",\n    }\n\n### sshkey provider\n\n#### manage entry\n\n    sshkey { \"foo.example.com\":\n      ensure  =\u003e present,\n      type    =\u003e \"ssh-rsa\",\n      key     =\u003e \"AAADEADMEAT\",\n    }\n\n#### manage entry with aliases\n\n    sshkey { \"foo.example.com\":\n      ensure       =\u003e present,\n      type         =\u003e \"ssh-rsa\",\n      key          =\u003e \"AAADEADMEAT\",\n      host_aliases =\u003e [ 'foo', '192.168.0.1' ],\n    }\n\n#### manage hashed entry\n\n    sshkey { \"foo.example.com\":\n      ensure        =\u003e present,\n      type          =\u003e \"ssh-rsa\",\n      key           =\u003e \"AAADEADMEAT\",\n      hash_hostname =\u003e true,\n    }\n\n#### hash existing entry\n\n    sshkey { \"foo.example.com\":\n      ensure        =\u003e hashed,\n      type          =\u003e \"ssh-rsa\",\n      key           =\u003e \"AAADEADMEAT\",\n      hash_hostname =\u003e true,\n    }\n\n#### delete entry\n\n    sshkey { \"foo.example.com\":\n      ensure =\u003e absent,\n    }\n\n#### manage entry in another ssh_known_hosts location\n\n    sshkey { \"foo.example.com\":\n      ensure  =\u003e present,\n      type    =\u003e \"ssh-rsa\",\n      key     =\u003e \"AAADEADMEAT\",\n      target  =\u003e \"/root/.ssh/known_hosts\",\n    }\n\n## Issues\n\nPlease file any issues or suggestions [on GitHub](https://github.com/voxpupuli/puppet-augeasproviders_ssh/issues).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvoxpupuli%2Fpuppet-augeasproviders_ssh","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvoxpupuli%2Fpuppet-augeasproviders_ssh","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvoxpupuli%2Fpuppet-augeasproviders_ssh/lists"}