Re: How to transfer data remotely to PCs in LAN via SFTP?



"Ahmad" <ahmad.abdulghany@xxxxxxxxx> writes:
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 ..

You could use public key login (see ssh(1) for details).
.



Relevant Pages

  • Re: How to transfer data remotely to PCs in LAN via SFTP?
    ... the same LAN.. ... know how to pass it in the code syntax.. ... for i in # 20 PCs ... echo "secret_password" | sftp user@... ...
    (comp.os.linux.development.apps)
  • Free-lance - office move stuff-o-rama
    ... Back up data on critical PCs ... I'm leaning towards setting up a Samba Server, ... Verify that LAN cable is installed. ... LAN printers are on lease. ...
    (Debian-User)
  • Re: How to create a Matlab cluster with 8 PCs
    ... How do I go about creating the cluster? ... My problem is I have no idea how to create a cluster first out of those PCs. ... Typically the hardware consists of a router and ethernet cables. ... Then you will need an additional cable to connect your campus LAN to ...
    (comp.soft-sys.matlab)
  • Setting up XP for "Public" use
    ... The PCs will be for visitors to use and give them internet access plus standard Office apps. ... Whilst I am happy on how to configure the LAN to allow this and no more - I have never set up XP for shared, public, use. ... My first thought was that they each get given a hard disk in a caddy, which then becomes "theirs". ... I have a spare NT server licence and a suitable machine. ...
    (microsoft.public.windowsxp.setup_deployment)
  • Re: Problems with traffic shaping (tcng / tc)
    ... > may not slow down the internet-connection of the PCs in the LAN. ... > assign all available bandwith tho the two end-user pcs in the LAN ... I route the two PCs into the internet doing NAT via iptables. ... > tcindex classid 2:4 ...
    (Debian-User)