You need to write your script to run scp in the expect scripting
language. Expect is an extention of tcl. Easy to use and easy learn. Your
problem is that the request for the password is not supposed to come from
stdin; it's supposed to come from /dev/console. Expect starts child
processes which have an attached pair of psuedo terminals whih it has full
control over.

-- 
-Time flies like the wind. Fruit flies like a banana. [EMAIL PROTECTED]
-Stranger things have happened but none stranger than this. Steven W. Orr-
Does your driver's license say Organ Donor?Black holes are where God \
-------divided by zero. Listen to me! We are all individuals!---------


On Fri, 1 Sep 2000, Gene Wilburn wrote:

=>I'm trying to replace an existing Perl script that does auto-FTP with scp
=>(ssh1) instead. The script fetches log files from our ISP and we would
=>like to close the FTP port entirely.
=>
=>The problem I'm having is the absence of a password option to feed
=>scp. I've got past this by having Perl write an Expect script then execute
=>that, but it seems a daft way to go... (I need the Perl script to do a
=>bunch of date and file renaming things).
=>
=>Is there a better option?
=>
=>Thanks,
=>
=>Gene



_______________________________________________
Redhat-list mailing list
[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/redhat-list

Reply via email to