Supply password to rsync

Supply password to rsync

Via environment variable

Use environment variable RSYNC_PASSWORD to provide password to rsync command

export RSYNC_PASSWORD=$PASSWORD
rsync -zvr source destination

or

env RSYNC_PASSWORD=$PASSWORD rsync -zvr source destination

Via password file

rsync --password-file=rsync_pass -zvr source destination

Some other methods

Such as sshpass and public key.

References

How can I rsync without prompt for password, without using public key authentication?

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes:

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>


The reCAPTCHA verification period has expired. Please reload the page.