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!

how to scp using perl script

Status
Not open for further replies.

SkyHigh

Technical User
May 30, 2002
309
CA
Hi guys

I have a perl script that picks some records from the databse, creates a file puts those records in that file, I need to add some routine to it to scp this file to another box, at Solaris prompt the command would be:

scp file_name user@host_name:/opt/reports/

then it prompts for password

please help me do this - thanks a bunch.
Brenda
 
# have u tried ?
system('scp file_name user\@host_name:/opt/reports/');
# note if u want to get the file_name from a var do
$fine_name = "whatever.file";
system('scp ' . $file_name . ' user\@host_name:/opt/reports/');
# hope this helps ---------------------------------------
wmail.jpg


someone knowledge ends where
someone else knowledge starts
 
Thanks and how can I take care of the password ??
Rgds
Brenda
 
what do u mean by take care ... [censored] ---------------------------------------
wmail.jpg


someone knowledge ends where
someone else knowledge starts
 
Whe you do scp you have to provide password for the user, please vide my first thread on this post - tks
Brenda
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top