On Mar 22, 3:56 pm, "Kalyan Manchikanti"
<kalyan.manchika...@gmail.com> wrote:
> On Mar 22, 7:19 am, "Ahmad" <ahmad.abdulgh...@gmail.com> wrote:
>
>
>
> > 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,
>
> google for "passwordless ssh" to set up your ssh key authentication .
> sftp uses ssh to transfer files. If you want to do this as root ( and
> still disable direct logins as root the directive in sshd_config you
> need to use is "PermitRootLogin without-passwowrd "( after setting up
> the ssh keys for the root user that is..)..
Hi,
This was my first post to this wonderfull forum!
I really got tired searching and trying to remotely transfer data to
group of PCs on a LAN using a shell script to perform passwordless
sftp transmission..
I am looking for help from someone that can give me the 1,2,3,.. steps
to do it.
And i am not a linux expert,

My problem is:
I want to make a script (function) that takes file path on current
host (i work on) and then loops on 20 PCs that has IPs from 10.10.13.1
through 10.10.13.20 and copy that file to the "user" homes.
How can i do it (please in details)
I know it may be bad to ask for that, but it's really urgent and i'm
not specialized in doing such stuff!!
BTW, I already googled and did my best, and tried somethings, but
unfortunately, all stuff failed to achieve what i seek!!!
Thanks a lot in advance,
Ahmad,