I am new to CFEngine and I am currently testing this application. I am having problems with copying files in remote hosts. This is probably because I need help in interpreting the following from the Tutorials page.
http://www.cfengine.org/manuals/cf3-tutorial.html "Permission to connect to the server, and The server control body must grant access to your computer and public key by name or IP address, by listing it in one of the lists (see below). Your public key must be trusted by the server, and you must trust the server's public key By mutually trusting each others' keys, client and server agree to use that key as a sufficient identifier for the computer. Permission to access something Your host name or IP address must be mentioned in an access promise inside a server bundle, made by the file that you are trying to access." Here is my cf file. "# 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" , "xx.xx.xx " }; allowallconnects => { "127.0.0.1" , "xx.xx.xx" }; trustkeysfrom => { "127.0.0.1" , "xx.xx.xx" }; } 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","remote-host"); }" Here is the command I use to run: ".cfagent/bin/cf-agent -K -v -f /tmp/toe_in_the_water.cf" I am getting the following errors: "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 xx.xx.xx.xx is established... cf3> Set cfengine port number to 5308 = 5308 cf3> Set connection timeout to 10 cf3> -> Connect to remote_host = xx.xx.xx.xx on port 5308 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 remote_host/xx.xx.xx.xx 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 remote_host failed cf3> Unable to establish connection with remote_host 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" I have done the following: 01) cat .cfagent/ppkeys/localhost.pub > user-.pub 02) cat .cfagent/ppkeys/localhost.pub >> .ssh/authorized_keys 03) This user is using a remote home directory and is the same user utilized for local and remote server. What am I missing from the requirements to have a successful server connection? Regards, j
_______________________________________________ Help-cfengine mailing list Help-cfengine@cfengine.org https://cfengine.org/mailman/listinfo/help-cfengine