Rsync with SSH prompting for remote password
You are mixing two separate connection modes: with a remote shell (-e ssh
) and without a remote shell, thru a rsync daemon
(identified by the double colon).
The manual states:
CONNECTING TO AN RSYNC SERVER
It is also possible to use rsync without a remote shell as the trans- port. In this case you will connect to a remote rsync server running on TCP port 873.
...... you either use a double colon :: instead of a single colon to separate the hostname from the path, or you use an rsync:// URL.
....... Some paths on the remote server may require authentication. If so then you will receive a password prompt when you connect. You can avoid the password prompt by setting the environment variable RSYNC_PASSWORD to the password you want to use or using the --password-file option. This may be useful when scripting rsync.
Probably the simplest way to obtain passwordless authentication for you is to modify the command above as follows:
rsync -avz -e ssh /home/user/dir [email protected]:/absolute/path/to/Backup/dir