Re: Editing known_hosts files

2010-03-01 Thread Daniel V Klein
Racing to leave for a trip, but take a look at set_variable_values in the cfengine_stdlib.cf - it'll take some tweaking, but it has the logic to "make sure some part of the line that looks 'like' this contains 'that', but ensure that there are no other lines that contain 'this'. The logic is all t

RE: Editing known_hosts files

2010-03-01 Thread Justin Lloyd
loys), maybe something like "bundle agent fetch_public_ssh_key(remote_host, remote_user, local_user)". Thanks, Justin -Original Message- From: Mark Burgess [mailto:cont...@cfengine.com] Sent: Monday, March 01, 2010 1:04 PM To: Justin Lloyd Cc: daniel.kl...@cfengine.com; Help-cf

Re: Editing known_hosts files

2010-03-01 Thread Daniel V Klein
.@lonewolf.com [mailto:d...@lonewolf.com] On Behalf Of > daniel.kl...@cfengine.com > Sent: Monday, March 01, 2010 12:04 PM > To: Justin Lloyd > Cc: Help-cfengine > Subject: Re: Editing known_hosts files > > In the latest version, look at regextract() - I think that'll help get &g

RE: Editing known_hosts files

2010-03-01 Thread NWatson
Some ssh_config settings might be less stressful: StrictHostKeyChecking, VerifyHostKeyDNS. Also see "VERIFYING HOST KEYS" in man ssh. Sincerely, -- Neil Watson 416-673-3465 CONFIDENTIALITY WARNING This communication, including any attachments, is for the exclusive use of addressee and may c

RE: Editing known_hosts files

2010-03-01 Thread Justin Lloyd
features, is a concern of mine for which I have a ticket open.) Justin -Original Message- From: d...@lonewolf.com [mailto:d...@lonewolf.com] On Behalf Of daniel.kl...@cfengine.com Sent: Monday, March 01, 2010 12:04 PM To: Justin Lloyd Cc: Help-cfengine Subject: Re: Editing known_hosts

Re: Editing known_hosts files

2010-03-01 Thread daniel . klein
In the latest version, look at regextract() - I think that'll help get the field you want, so you can do your insert... -Dan > No responses? Ok, let me restate the problem more simply. > > Given a file whose lines have three space-delimited fields, and given a > string variable that contains a s

RE: Editing known_hosts files

2010-03-01 Thread Justin Lloyd
e that step. Justin -Original Message- From: nwat...@symcor.com [mailto:nwat...@symcor.com] Sent: Monday, March 01, 2010 11:54 AM To: Justin Lloyd Cc: Help-cfengine; help-cfengine-boun...@cfengine.org Subject: RE: Editing known_hosts files I'm still not sure why you might want to do this. Ssh

RE: Editing known_hosts files

2010-03-01 Thread NWatson
I'm still not sure why you might want to do this. Ssh already gives out public keys upon request. Why distribute them using CF? Are you looking to control incidents when the public key changes? Sincerely, -- Neil Watson 416-673-3465 CONFIDENTIALITY WARNING This communication, including any

RE: Editing known_hosts files

2010-03-01 Thread Justin Lloyd
ubject: RE: Editing known_hosts files No responses? Ok, let me restate the problem more simply. Given a file whose lines have three space-delimited fields, and given a string variable that contains a similar line, how do I replace the entire line in the file whose third field matches the third field in

RE: Editing known_hosts files

2010-03-01 Thread Justin Lloyd
No responses? Ok, let me restate the problem more simply. Given a file whose lines have three space-delimited fields, and given a string variable that contains a similar line, how do I replace the entire line in the file whose third field matches the third field in the string with that variable? I