How to rsync, or scp?

Hi all.

I’m not able to set up a rootd server or anything on the remote machine where much of our data is stored. So, I’ve written an object that will rsync to a server and get a file. However, sometimes it needs to get multiple files if it can’t find what its looking for in the first file. For each file that I try to rsync, it prompts the user for their password. How can I set it up so that the user gives the password once and then the object keeps using it?

Right now, I do
gSystem->Exec(“rsync -Lz user@server:/filepath/file.root /tmp/file.root”);
which then prompts for the password.

Any way of doing this automatically? I couldn’t figure it out from reading the class descriptions in the NET module. Maybe somebody can enlighten me.
Thanks,
Adam

Hi,

The password request is a feature of rsync and not root. To reduce the password requests, you probably should try scp (and/or may need to setup an ssh public/private key authentication).
You may also want to give a try to xrootd which is distributed along side ROOT.

Cheers,
Philippe.