We are trying to implement a safe rsync for backups between 2 servers. We are trying by all means to avoid having root access with no passwords between the 2 systems and if any just do that for an specific user.
I understand this has issues with permissions of the backed up files. I've read here in serverfault and also on this site about using fakeroot and about the "PermitRootLogin forced-commands-only" option of SSH server but still can't figure out what is the most logical and reasonable option from a security point of view. We do not want a root user to automatically have root access on the other machine without a password. Not sure if we are just to paranoid about it but as I suppose this is something pretty usual any feedback would be mostly appreciated.
- Does the PermitRootLogin forced-commands-only with a pair of keys for no password be good enough? Does this need an specific list of allowed commands on the destination server (i.e rsync)?
- Would the fakeroot option work (mainly data backups in our case) and if so... how is it combined with the rsync command?
- Can we have an rsync user with sufficient permissions on both systems so the passwordless rsync works fine?
Many thanks.