class sshd {
	
	concat { '/etc/ssh/sshd_config':
		ensure => present,
	}
	exec {"check_presence_add_new":
		command => "/bin/cp -rfp /etc/ssh/sshd_config /etc/ssh/sshd_config_base",
		creates => "/etc/ssh/sshd_config_base",
	}
	augeas { "sshd_config_base":
                context => "/files/etc/ssh/sshd_config_base",
                changes => [
                        "set PermitEmptyPasswords no",
                        # "set PermitRootLogin no",
                        "set LoginGraceTime 60",
                        #"set AllowUsers",
                        #"set AllowGroups",
                ],
        }

	# concat { '/etc/ssh/sshd_config_base':
	#	ensure => present,
	# }
	concat::fragment { 'sshd_config_concat_repopulate_baseline':
		target => '/etc/ssh/sshd_config',
		source => '/etc/ssh/sshd_config_base',
		order => '01',
		mode => '0600',
	}
	concat::fragment { 'sshd_config_concat_add_custom_lines':
		target => '/etc/ssh/sshd_config',
		content => '
PermitEmptyPasswords no
#Ciphers aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128 
#MACs hmac-sha1,umac-64@openssh.com,hmac-ripemd160
LoginGraceTime 30
#PermitRootLogin yes
#StrictModes yes
MaxAuthTries 4
MaxSessions 2',
		order	=> '02',
		mode => '0600',
	}
	service { "sshd":
                        ensure => "running",
        }
}
