[Planetlab-users] how to transmit file in a batch manner

=?GB2312?B?tN7QocH6?= sunshine870 at gmail.com
Tue Jan 17 06:18:24 EST 2012


Hi, Dear Christos!

Thank you very much! I have solved the problem with your help.

However, the command "scp" requires to input password every time. Is there
any way that I can put my password into the script so that there is no need
for me to input every time?

Looking forward to your reply!

Best wishes,
Xiaolong

2012/1/15 Christos Ploutarchou <cplout01 at cs.ucy.ac.cy>

> you can use a script of the form (having the nodes to upload into
> a separate file (ex. hosts)
>
> HOSTFILE='hosts'
>
> if [ -f $HOSTFILE ]
> then
>    printf "Host file found, preparing to transfer\n"
>    while read server
>    do
>     scp -i ~/.ssh/id_rsa -r fileToUpload (or folder) sliceName@
> $server:DestinationFolder
>    done < $HOSTFILE
> else
>    printf "File \"$SOURCEFILE\" not found\n"
>    exit 0
> fi
> exit 0
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.planet-lab.org/pipermail/users/attachments/20120117/46d61134/attachment.html


More information about the Users mailing list