[Klug-general] PSCP from Windows to Linux via PHP

David Halliday david.halliday at gmail.com
Thu May 5 16:35:54 UTC 2011


Can it be waiting for you to say yes to the id of the target machine?

I remember this as being a problem with ant scripts in the past.

On 5 May 2011 16:59, Nathan Friend <nathan.friend at gmail.com> wrote:

> Afternoon KLUG,
> I'm using a PHP script to copy a file from a Windows machine to a Linux
> machine.
>
> I found PSCP, a windows version of SCP
> (http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html)
> which works perfectly from the Windows CLI.
>
> Unfortunately when I run it from a PHP script it just hangs at the
> PSCP commend.  No errors in the Apache log, so I guess it's waiting
> for something.
>
> <?php
> exec('c:\apps\pscp -q -i c:\key\akeyfile.ppk c:\source_file.txt
> user at linuxbox:/destination/');
> ?>
>
> I'm using key files to prevent a password prompt and the -q switch to
> suppress output.
>
> Any ideas?
>
> Cheers,
>
> Nathan.
>
> _______________________________________________
> Kent mailing list
> Kent at mailman.lug.org.uk
> https://mailman.lug.org.uk/mailman/listinfo/kent
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.lug.org.uk/pipermail/kent/attachments/20110505/3992fa70/attachment.htm>


More information about the Kent mailing list