Forge Home

ssh

Module to manage SSH server and their config file.

9,847 downloads

7,910 latest version

4.2 quality score

We run a couple of automated
scans to help you access a
module's quality. Each module is
given a score based on how well
the author has formatted their
code and documentation and
modules are also checked for
malware using VirusTotal.

Please note, the information below
is for guidance only and neither of
these methods should be considered
an endorsement by Puppet.

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

  • 1.3.1 (latest)
  • 1.3.0
  • 1.2.1
  • 1.2.0
  • 1.1.0
  • 1.0.1
  • 1.0.0
released Jan 24th 2016
This version is compatible with:
  • Puppet Enterprise 2017.2.x, 2017.1.x, 2016.5.x, 2016.4.x
  • Puppet >= 3.0.0 < 5.0.0
  • ,

Start using this module

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

Add this module to your Puppetfile:

mod 'mtulio-ssh', '1.3.1'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add mtulio-ssh
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install mtulio-ssh --version 1.3.1

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

mtulio/ssh — version 1.3.1 Jan 24th 2016

ssh

Table of Contents

  1. Overview
  2. Module Description
  3. Setup
  4. Usage
  5. Limitations
  6. Development
  7. Release Notes

1. Overview

This module can install and configure SSH server config file [ and in the future manages the client ]

2. Module Description

Module to manage SSH server config file.

3. Setup

See Usage

What module affects

  • This module module will install SSH server package in your system.

Setup Requirements

  • puppet module install mtulio-ssh

Beginning

This is a great module to configure your SSH server config file.

4. Usage

  1. Default config
 class { '::ssh::sshd_config': }
  1. Permit root login and allow some users
 class { '::ssh::sshd_config': 
   permitrootlogin   => 'yes'
   allow_users       => 'root vagrant admin1'
 }
  1. Ensure Local User, block root login
 class { '::ssh::sshd_config': 
   user_local_enable => 'yes',
   user_local_ensure => 'sysadmin',
   user_password     => '$6$GpTlgkVr$CHLWoyzd4fGD/c4eG2A5JnR8HvsrUF0sGnHrpumysSsJRW5laOfMrvuYX3qjlLriQXGQVHqLq8UIpOxe9Wz2C1', # admin@123
   permitrootlogin   => 'no'
   allow_users       => 'vagrant admin1 admin2 admin3'
 }
  1. Set sshd banner. Ensure the file is present
file {'/etc/ssh/banner':
  path => '/etc/ssh/banner',
  source => "puppet:///modules/ssh/sshd_banner_example_pt-br",
  owner   => 'root',
  group   => 'root',
  mode    => '0644',
}
class { '::ssh::sshd_config':
  user_local_enable => 'yes',
  user_local_ensure => 'sysadmin',
  user_password     => '$6$GpTlgkVr$CHLWoyzd4fGD/c4eG2A5JnR8HvsrUF0sGnHrpumysSsJRW5laOfMrvuYX3qjlLriQXGQVHqLq8UIpOxe9Wz2C1', # admin@123,
  permitrootlogin   => 'no',
  allow_users       => 'admin1 admin2 admin3'
  bannerpath        => '/etc/ssh/banner',
}

5. Limitations

OS compatibility [tested]:

  • Red Hat family 6Server and 7Server

We're working to support more OS.

6. Development

See project page at https://github.com/mtulio/puppet-mod-ssh

7. Release Notes

[1.3.0][1.3.1]

  • Add Allow/Deny users and groups

[1.2.1]

  • Fix metadata dependences

[1.2.0]

  • Add 'banner' support to template config file - sshd_conf

[1.1.0]

  • Changing global parameter of sshd_config template:

from:

GSSAPIAuthentication yes
GSSAPICleanupCredentials no

to:

GSSAPIAuthentication no
GSSAPICleanupCredentials yes

[1.0.1]

  • Review document description

[1.0.0]

  • Manage sshd_config