On Thu, 28 Apr 2005, Conor Wynne wrote:
> RSYNC is my friend here. But I'm wondering how to use rsync in a script so
> that it can run via crontab without entering authentication manually.
I suggested ssh keys without passphrases (while sternly warning of the
potential implications) in
http://www.barryodonovan.com/publications/lg/104/ and it includes
Depending on your environment, passphrase-less ssh keys might be
Some details I didn't go into in the article were to be sure to use a
specific key for only this purpose and use a restricted account on the
remote server (such as setting the shell to rbash - see man bash and look
for RESTRICTED SHELL).
You can invoke rsync over ssh and specify a specifc key with:
rsync -a -e "ssh -i /home/username/.ssh/id_rsa-serverbackup"
Maintained by the ILUG website team. The aim of Linux.ie is to
support and help commercial and private users of Linux in Ireland. You can
display ILUG news in your own webpages, read backend
information to find out how. Networking services kindly provided by HEAnet, server kindly donated by
Dell. Linux is a trademark of Linus Torvalds,
used with permission. No penguins were harmed in the production or maintenance
of this highly praised website. Looking for the
Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!