How to transfer data remotely to PCs in LAN via SFTP?
- From: "Ahmad" <ahmad.abdulghany@xxxxxxxxx>
- Date: 22 Mar 2007 05:22:01 -0700
Hi,
I want to automate transferring file or folder to 20 PCs connected via
the same LAN..
The problem i face is that they need to enter password and i don't
know how to pass it in the code syntax..
Sample Code:
for i in (1:20) # 20 PCs
do
sftp user(at)10.0.0.$i # to log-in remotely to PCs one by one
# Password should be entered here!! How to ??
put $file ; # transfer the file to destination PC
exit # come back to current shell
done # will go to log-in to the next PC
I want to either override password promot, or find a way to pass it
automatically to the standard input ..
P.S. I have the root password and everything.
Can anyone help me please? I'm not a programmer in fact, so if you see
that my code is weak, please correct it to me..
Thanks in advance,
Ahmad,
.
- Follow-Ups:
- Re: How to transfer data remotely to PCs in LAN via SFTP?
- From: Sergei Organov
- Re: How to transfer data remotely to PCs in LAN via SFTP?
- From: Rainer Weikusat
- Re: How to transfer data remotely to PCs in LAN via SFTP?
- Prev by Date: Re: Is splint the best for static code checking? I mean free.
- Next by Date: Re: How to transfer data remotely to PCs in LAN via SFTP?
- Previous by thread: File Handling
- Next by thread: Re: How to transfer data remotely to PCs in LAN via SFTP?
- Index(es):
Relevant Pages
|