I want to sync some files from a remote server to local system. Because the files are large, it may last for several hours, so i want to run it as nohup:
nohup rsync -r <user>@<remote>:<dir> <local-dir> &
The problem is that it prompted for the password of the remote server, but after i typed the password, the bash just said
-bash: mypassword: command not found
I have also tried the --password-file option, but seems the --password-file is not for SSH account, it's for rsync service.
Could someone tell me how to input password automatically while keeping the nohup.