On 10/31/07, James <[EMAIL PROTECTED]> wrote: > > > > On 10/31/07, Michael Grant <[EMAIL PROTECTED]> wrote: > > > > If I'm sued as root and I ssh somewhere, ssh/scp reads it's files from > > /root/.ssh/. The docs say it reads from ~/.ssh which is what I want, > > but it's not doing that. When sued, the shell is properly expanding ~ > > to my home dir. > > > > Anyone know of a way around this behavior? > > > > Michael Grant > > > su - root
Nope. One other suggestion was 'su -l root'. This does not change the situation either. I went into the source for ssh and it does a getuid() and then gets the homedir of that uid. So no amount of fooling with su is gonig to fix this. I guess it's like this for security reasons, it sure seems like a bug to me. I'd have used the HOME enviroment variable. So far, the best fix I've found is to create some aliases in bash as follows: alias scp="scp -o User=username -i ~/.ssh/id_rsa" alias ssh="ssh -l username -i ~/.ssh/id_rsa" alias rsync="rsync -op -e 'ssh -l username -i /home/username/.ssh/id_rsa'" _______________________________________________ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"