0 Replies Latest reply on Nov 29, 2006 9:34 AM by Abram Adams

    cfexecute scp on linux CFMX7

    Abram Adams
      I'm trying to script a copy from server A to server B using the linux secure copy (scp). I have created the proper keygen keys and can execute the command from ssh logged in as the user that CFMX7 runs as without problem. The problem is that when I try to exectue scp via cfexectute it does not fire.
      This is what I do in ssh:

      [cfuser@myhost.com] # scp cfuser@myhost.com:/var/www/somefile.jpg cfuser@myhost2.com:/var/www/somefile.jpg
      That works everytime. It doesn't ask for a password since the host is in the authorized_keys file.

      Now this is my cfexecute:
      < cfexecute name="scp" arguments='cfuser@myhost.com:/var/www/somefile.jpg cfuser@myhost2.com:/var/www/somefile.jpg'>< /cfexecute >
      This does not work. I've tried to pass root as the user (which also has a pub key in the authorized_keys) with no luck.

      For this case I cannot use cfftp, so unfortunately that's not an option. I even wrote a perl wrapper that executes system('scp ...') and though it works from command line, does not work via cfexecute.

      Any suggestions?