ehaselwanter / puppet-ssh-hardening

This puppet module provides secure ssh-client and ssh-server configurations.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ssh_hardening (Puppet module)

Description

This module provides secure ssh-client and ssh-server configurations.

Requirements

  • Puppet
  • Puppet modules: saz/ssh (>= 2.3.6), puppetlabs/stdlib (>= 4.2.0)

Parameters

  • ipv6_enabled = false - true if IPv6 is needed
  • cbc_required = false - true if CBC for ciphers is required. This is usually only necessary, if older M2M mechanism need to communicate with SSH, that don't have any of the configured secure ciphers enabled. CBC is a weak alternative. Anything weaker should be avoided and is thus not available.
  • weak_hmac = false - true if weaker HMAC mechanisms are required. This is usually only necessary, if older M2M mechanism need to communicate with SSH, that don't have any of the configured secure HMACs enabled.
  • weak_kex = false - true if weaker Key-Exchange (KEX) mechanisms are required. This is usually only necessary, if older M2M mechanism need to communicate with SSH, that don't have any of the configured secure KEXs enabled.
  • allow_root_with_key = false - false to disable root login altogether. Set to true to allow root to login via key-based mechanism.
  • ports = [ 22 ] - ports to which ssh-server should listen to and ssh-client should connect to
  • listen_to = [ "0.0.0.0" ] - one or more ip addresses, to which ssh-server should listen to. Default is empty, but should be configured for security reasons!
  • remote_hosts - one or more hosts, to which ssh-client can connect to. Default is empty, but should be configured for security reasons!
  • allow_tcp_forwarding = false - set to true to allow TCP forwarding
  • allow_agent_forwarding = false - set to true to allow Agent forwarding

Usage

After adding this module, you can use the class:

class { 'ssh_hardening': }

This will install ssh-server and ssh-client. You can alternatively choose only one via:

class { 'ssh_hardening::server': }
class { 'ssh_hardening::client': }

You should configure core attributes:

class { 'ssh_hardening::server':
  "listen_to" : ["10.2.3.4"]
}

The default value for listen_to is 0.0.0.0. It is highly recommended to change the value.

Contributors + Kudos

License and Author

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

About

This puppet module provides secure ssh-client and ssh-server configurations.


Languages

Language:Puppet 54.2%Language:Ruby 45.8%