Your ads will be inserted here by

Easy Plugin for AdSense.

Please go to the plugin admin page to
Paste your ad code OR
Suppress this ad slot.

ReCap: Instalation and troubleshooting

Create directories:
sudo mkdir -p /etc/puppet/modules/sshd/{manifests,files}

Writing Class:
File Location: /etc/puppet/modules/sshd/manifests/init.pp

class sshd {

package { 'openssh-server':
ensure => latest
}

Your ads will be inserted here by

Easy Plugin for AdSense.

Please go to the plugin admin page to
Paste your ad code OR
Suppress this ad slot.

service { 'ssh':
subscribe => File[sshdconfig],
require => Package['openssh-server'],
}

file { 'sshdconfig':
name => '/etc/ssh/sshd_config',
owner => root,
group => root,
mode => 644,
source => 'puppet:///modules/sshd/sshd_config',
require => Package['openssh-server'],
}
}

Fix Permissions:
chown puppet: /etc/puppet/modules/sshd/files/sshd_config
chmod 600 /etc/puppet/modules/sshd/files/sshd_config

This file needs to be called inside the node call:
include sshd

Test for syntax error:
puppet parser validate init.pp

Test using dryrun:
puppet agent -t --noop