All,
 
I have developed a CGI that will take information from a CGI based form and
SCP a specific file to a remote server. I am having some troubles and I
think I need to escape something. Anyone have any ideas? Snippet of code is
as follows:
 
# SCP commands
my $scp_cmd = "/usr/bin/scp";
my $scp_opts = "-i /root/.ssh/identity ";
 
# Promote the file to merlin
        system(`$scp_cmd $scp_opts $src_dir/*
[EMAIL PROTECTED]:/$directories_map{$q->param("promdir")}`);
 
Error:
Wed May 26 13:47:47 2004] promote.cgi: Execution of
/www/web/cgi-sec/merlin/promote.cgi aborted due to compilation errors.
Warning: Identity file /root/.ssh/identity does not exist.
Host key verification failed.
lost connection
[Wed May 26 13:48:55 2004] [error] [client 199.159.140.172] Premature end of
script headers: /www/web/cgi-sec/merlin/promote.cgi
 
If I do the above command from the command line all works perfectly. Thanks
in advance.
 
Regards,
John

Reply via email to