Jeff:

I think you have the | in the wrong place. It should be
at the end of the line, as :

open(SCP,"scp source dest|");

I think there is a way in ssh/scp to set up a similiar thing to
an rhosts. This is one way to be coding a password into a script.
That is the tradeoff of having some host trust your login / host
combination.

Best Regards,
Greg
-----Original Message-----
From: Jeff Liu [mailto:[EMAIL PROTECTED]]
Sent: Monday, April 01, 2002 12:06 PM
To: Lirot, Gregory; Beginners
Subject: RE: scp inside perl



Hi Greg,

Thanks for your help.

But I have difficulty to fill in the password. What I like to do is, 

open (SCP, "| scp source destination");
print SCP scppassword;
close SCP;

Above code does not work for me. Any idea to make it work?

Best regards,

Jeff Liu


-----Original Message-----
From: Lirot, Gregory [mailto:[EMAIL PROTECTED]]
Sent: April 1, 2002 12:02 PM
To: Jeff Liu; Beginners
Subject: RE: scp inside perl



Jeff:
Yes. Merely use something like:

system("scp Source Destination");

This would be the easiest way, or, also:

`scp Source Dest`;

More elaborate stuff can be done, but this is good for starters.

Best Regards,

Greg 
-----Original Message-----
From: Jeff Liu [mailto:[EMAIL PROTECTED]]
Sent: Monday, April 01, 2002 11:44 AM
To: Beginners
Subject: scp inside perl



Hi all,

Is there a way to do scp inside perl script?

Thanks,
Jeff Liu

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to