Hello guys, I need to create a daily backup for files and save them on another server
I use

rsync -av --progress --inplace --rsh='ssh -p22' /var/www/html/product root@37.101.11.144:/var/www/html/backup/

but this ask me for password , I want to create a cron job to copy files automatically at midnight.
how can I baypass the password ?

Recommended Answers

Don't use password auth, use keys instead.

This article explains it all.

http://www.thegeekstuff.com/2011/07/rsync-over-ssh-without-password/

Jump to Post

All 3 Replies

Just a direction here. instead of password, there might be some setting to use public key and private key by which the authorization works. try to setup that. Caution: these keys will have an expiry date I guess. if it is the case, then periodically you need to change these keys for the process to work.

@CimmerianX
its exactly what I want :D

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.20 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.