shell script rsync password file option
11,216
If protocol is rsync you can use:
rsync -a --password-file=/path/to/secret rsync://[email protected]/root /backup
If rsync over ssh used, you should setup public key ssh auth. On local host run
ssh-keygen -t rsa -b 1024
then add content of ~/.ssh/id_rsa.pub to ~/.ssh/authorized_keys on remote host.
Author by
Rajeev
Updated on June 04, 2022Comments
-
Rajeev almost 2 years
In a shell script how to use
rsync --password-file
optionrsync -a [email protected]:/root /backup