running scp or rsync from a script

Chris Purcell redhat at cjp.us
Wed Jul 28 15:35:45 UTC 2004


I have a bunch of Linux workstations that need to copy files to a central
server via cron daily.   I want to set up either an scp or rsync script
(either Perl or bash), but the problem is the password prompt.  There
doesnt' seem to be anyway to enter a password into an scp script, but with
rsync I can use the --password-file=FILE option only if the central server
is running the rsyncd daemon.   I'd much rather use scp than have to run
an rsync server.   I guess my only option with scp would be to set up
RSA/DSA keys.   The workstations will scp to the server as a user called
"tc", not root.   It would be way too much work having to copy
certificates from each workstation to the server so I was wondering if its
possible to allow anybody to ssh/scp into the central server as the user
"tc" without entering a password?    The user "tc" has very limited access
and the server is on a LAN, so security isn't an issue here.  Does anyone
have any other ideas on how to go about doing this?

Thanks,
Chris






More information about the redhat-list mailing list