I have solved the login/public key issue.
I change the command line:
pscp root@... c:\linux\
to following:
pscp -pw gumstix root@... c:\linux\
Hanguang wrote:
>
> I posted a request about how to use "scp" to transfer file between Gusmtix
> and Fedora last week, thank whomever gave a hand.
> We are facing the same problem again, except now we are dealing with
> Windows instead of Fedora.
>
> I wrote a .bat file which can be run under DOS and using "pscp" command to
> transfer file from Gusmtix to Windows every 2 second:
>
> ***************************************************
> @echo off # run
> command up to 5000 times
> for /l %%n in (1,1,5000) do (
> rem cls
> echo **************************************
> echo Read data from Gumstix, #%%n
> echo **************************************
> pscp root@... c:\linux\ # transfer outfile
> from Gusmtix to Windows
> %wait%
> %wait% # wait
> for 2 second
> cls
> )
> *****************************************************
>
>
> There are several problems:
> 1. The public key I created before seemed does not work for Windows.
> http://www.nabble.com/file/p16870879/001.jpg
> Do I have to create a new public key in order to avoid the login prompt?
>
> 2. The process hung after it transfer the file for the first time.
> http://www.nabble.com/file/p16870879/002.jpg
> As you can see, "100%" indicated the file was successfully transfered, but
> the "pscp" command seemed not finished yet. In my last request, Jason told
> me that I could force the "scp" command to be terminated. This is his
> suggestion for shell script.
>
> ******************************************
> #! /bin/sh
> while [[ 1 ]]; do
> scp root@... ~/TEMP &
> PID=$!
> sleep 5
> kill -0 $PID
> if [[ $? -eq 0 ]] ; then
> echo "pid still there"
> else
> echo "completed"
> fi
> done
> **********************************************
>
> But how can I terminate the "pscp" command under DOS to make the loop
> continue?
>
>
>
--
View this message in context: http://www.nabble.com/Transfer-file-between-Gumsix-and-Windows-tp16870879p16907368.html
Sent from the Gumstix mailing list archive at Nabble.com.
|