I want a production server to push backup files to a backup machine. Backups are being done via www-data
cron script (as they can be edited by website cms), and once it has finished the idea is to send this files to backup server via rsync & ssh. www-data
is a 'no login user' account (no home, no ~/.ssh folder).
In a 'user can login' account I would login, generate a certificate with ssh-keygen
and place public key into .ssh/authorized_keys
in backup machine.
How can I make this 'user no login' account to send files to remote machine with rsync and ssh?
Best Answer
you can try something like the following