On Sun, Mar 08, 2009 at 11:20:09PM +1300, Morgan Read wrote: > On 03/03/09 02:21, Greg Wooledge wrote: > > where original_real_uid is set somewhere earlier in ssh.c. I won't > > try to track it down any further (especially since I'm looking at > > out-of-date sources), but it sure looks like it's evaluating the > > home directory based on the current uid or euid, rather than the > > contents of $HOME. > > It appears none of the environment variables has any impact on where ssh > looks for it's keys. I think that's what Greg just told you. :) But I have to ask, if the rsync user's keys are the ones you're trying to use, and the remote root user has those keys in its authorized_keys file, why are you bothering with the sudo? If it's because you need root permissions for the local end of the process, then it seems like the right thing to do is use root's keys, or have the sudo process load the rsync user's keys by specifying the identity on the ssh command line. (It's also possible to play games with ssh-agent, but I won't go there.) If you specify the key to use outright, there's no confusion about which key will be tried... -- Derek D. Martin http://www.pizzashack.org/ GPG Key ID: 0x81CFE75D
Attachment:
pgpifMZBIqoqv.pgp
Description: PGP signature