Forum: CFEngine Help
Subject: Re: sshd_conf managing with cfengine
Author: DodoPahim
Link to topic: https://cfengine.com/forum/read.php?3,19218,23781#msg-23781
Hi all. I'm starting with cfengine and I've my first issue.
"edit_sshd" bundle is very useful, but what about &q
Forum: Cfengine Help
Subject: Re: sshd_conf managing with cfengine
Author: zzamboni
Link to topic: https://cfengine.com/forum/read.php?3,19218,19273#msg-19273
By the way, the brackets in the arrays don't come out right through the email
list, although they look fine in the forum. Forum a
Forum: Cfengine Help
Subject: Re: sshd_conf managing with cfengine
Author: zzamboni
Link to topic: https://cfengine.com/forum/read.php?3,19218,19272#msg-19272
I have implemented an edit_sshd bundle which allows generalized parameter
setting, and handles restarting sshd. Here it is:
bundle agent
It works fine for me. Here what I did.
body common control
{
bundlesequence => { "test" };
inputs => { "/var/cfengine/inputs/cfengine_stdlib.cf" };
}
bundle agent test
{
files:
"/tmp/sshd_config"
edit_line => uncomment_lines_containing("PermitRootLogin.*","#");
}
r...@testmachine:/tmp#