--- Steve Douville <[EMAIL PROTECTED]> wrote:
> I'm trying to write something to run as a cron job that will
> perform an sftp command and then run a batch file. I was trying
> to use:
> 
> system("sftp [EMAIL PROTECTED]")
> 
> But that stalls and waits for a password before continuing with
> the script. Any ideas on how to pass the password when it's
> prompted?

Yes, you have to use a language like Expect.

If you want to stick with PHP, you're better off using an ssh key, so that
you're not prompted for the password.

Hope that helps.

Chris

=====
Chris Shiflett - http://shiflett.org/

PHP Security - O'Reilly     HTTP Developer's Handbook - Sams
Coming December 2004        http://httphandbook.org/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to