Carney Mimms wrote:
I am now able to ssh from remote to local and local to remote without passwords using RSA keys, but if I run the script without sudo, i.e. Sudo /usr/local/bin/rsync ... It can’t copy files that need root permissions. If I leave out the sudo and run the script after becoming root (sudo su), I get prompted for a password again.

When you become root, ssh will try to read keys from the home directory
proper for a new uid, regardless of the $HOME setting. The same happens when you specify "sudo rsync" remotely. If you setup the keys properly for root and allow it to login using ssh (eg. PermitRootLogin without-password), it should work fine.

--
Please use reply-all for most replies to avoid omitting the mailing list.
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html

Reply via email to