Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Perl script to run scp cmd

Status
Not open for further replies.

CherylD

Programmer
May 1, 2001
107
CA
I have a perl script that securely transfers a file from the machine that is runnign the script to another. I am using the linux scp command. I have secure keys generated on both machines and via command line the scp command works, within the script it doesn't. Here is what the script is doing:
system('/usr/bin/scp -B file othermachine:/otherdirectory/');

Here is what I get in the error log:
Could not create directory '/var/Host key verification failed.
lost connection

Via command line the output is:
dodns.cgi 100% |***************| 2748 00:00

Any ideas?
 
It's been a while since I worked with Unix but it appears to me that the system is trying to load to or create a directory with a name that starts with a period (dot). I may be mistaken but as I recall, this is reserved for filenames and can't be used for directories. There's always a better way...
 
you have wrong HOME dirs defined in /etc/passwd || nis vox clamantis in deserto.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top