ssh

Module to manage SSH server and their config file.
Marco Tulio

Marco Tulio

mtulio

7,852 downloads

6,533 latest version

4.2 quality score

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 Jul 3rd 2019
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
  • RedHat
    ,
    CentOS

Start using this module

Documentation

mtulio/ssh — version 1.3.1 Jul 3rd 2019

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