Sjoerd,

Here is the cf file after implementing your recommendation.

"cat /tmp/toe_in_the_water.cf
# toe in the water
body common control
{
        bundlesequence => { "copyFile" };
        ignore_missing_bundles => "true";
        require_comments => "true";
        inputs => { ".cfagent/inputs/cfengine_stdlib.cf" };
}

body server control
{
allowconnects         => { "127.0.0.1" , "1.2.3" };
allowallconnects      => { "127.0.0.1" , "1.2.3" };
trustkeysfrom         => { "127.0.0.1" , "1.2.3" };
}

bundle agent copyFile
{
        files:
                "/tmp/toe_in_water_folder_create/toe_in_water_file_copy.txt"
                comment => "copyFile copy main file",
                copy_from => 
local_cp("/tmp/toe_in_water_folder_create/toe_in_water_file_create.txt");

                "/tmp/toe_in_water_folder_create/host_from_remote"
                comment => "copyFile copy from remote",
                copy_from => secure_cp("/etc/hosts","1.2.3.4");
}"


Here is the error received after the change.

"cf3>     .........................................................
cf3>     Promise handle:
cf3>     Promise made by: /tmp/toe_in_water_folder_create/host_from_remote
cf3>
cf3>     Comment:  copyFile copy from remote
cf3>     .........................................................
cf3>
cf3>  -> Copy file /tmp/toe_in_water_folder_create/host_from_remote from 
/etc/hosts check
cf3> No existing connection to 1.2.3.4 is established...
cf3> Set cfengine port number to 5308 = 5308
cf3> Set connection timeout to 10
cf3>  -> Connect to 1.2.3.4 = 1.2.3.4 on port 5308
cf3>  -> Did not find new key format /var/cfengine/ppkeys/root-.pub
cf3>  -> Trying old style /var/cfengine/ppkeys/root-1.2.3.4.pub
cf3>  -> Could not map key file to new format - we have no digest yet (using 
/var/cfengine/ppkeys/root-1.2.3.4.pub)
cf3>  -> Going to secondary storage for key
cf3> Couldn't send
cf3>  !!! System error for send: "Connection reset by peer"
cf3> Couldn't send
cf3>  !!! System error for send: "Broken pipe"
cf3> Couldn't send
cf3>  !!! System error for send: "Broken pipe"
cf3> Challenge response from server 1.2.3.4/1.2.3.4 was incorrect!
cf3> I: Report relates to a promise with handle ""
cf3> I: Made in version 'not specified' of '/tmp/toe_in_the_water.cf' near line 
40
cf3> I: Comment: copyFile copy from remote

cf3>  !! Authentication dialogue with 1.2.3.4 failed
cf3> Unable to establish connection with 1.2.3.4
cf3>  -> No suitable server responded to hail
cf3> Promise (version not specified) belongs to bundle 'copyFile' in file 
'/tmp/toe_in_the_water.cf' near line 40
cf3> Comment: copyFile copy from remote
"

Regards,
j

-----Original Message-----
From: help-cfengine-boun...@cfengine.org 
[mailto:help-cfengine-boun...@cfengine.org] On Behalf Of Sjoerd Oostdijck
Sent: Tuesday, May 31, 2011 11:56 AM
To: help-cfengine@cfengine.org
Subject: Re: Cfengine Help: Cfengine Help: Cannot copy files to remote host

On 5/31/11 8:47 PM, Sjoerd Oostdijck wrote:
> On 5/31/11 8:39 PM, Jerome Yanga wrote:
>> cf3>   Unable to establish connection with remote_host
>> cf3>    ->   No suitable server responded to hail
>
> Is your server running a cf-serverd process? (and is that cf-serverd
> configured to trust keys from the box your are trying to connect from?)
>
I just noticed that it changed remote-host into remote_host. This makes 
me think that cfengine is not liking the hostname you gave it. Give it a 
try with a FQDN or an IP address instead.

-Sjoerd.
_______________________________________________
Help-cfengine mailing list
Help-cfengine@cfengine.org
https://cfengine.org/mailman/listinfo/help-cfengine

_______________________________________________
Help-cfengine mailing list
Help-cfengine@cfengine.org
https://cfengine.org/mailman/listinfo/help-cfengine

Reply via email to