On Fri, Aug 25, 2006 at 10:46:59AM -0700, Greg Thomas wrote:
> On 8/25/06, Alexander Hall <[EMAIL PROTECTED]> wrote:
> >Greg Thomas wrote:
> >> I've got a little backup script piping dump to ssh to my backup server
> >> rice, and I've got my keys setup:
> >
> >> [EMAIL PROTECTED]:/home/ethant# sudo /sbin/dump -0auf - /dev/rwd0a | gzip 
> >> | \
> >>> ssh [EMAIL PROTECTED] "cat > /grits/$(date "+%Y%m%d")_root.dump.gz"
> >
> >Here you are running ssh as yourself, thereby using your own keys.
> >
> >>  DUMP: Date of this level 0 dump: Fri Aug 25 00:21:08 2006
> >> ...
> >> ================================================
> >>
> >> But when I run this simple script (an almost identical copy of which
> >> is working fine on another laptop with 3.8 installed, the only
> >> difference is the path to the dump) I get prompted for my password:
> >>
> >> [EMAIL PROTECTED]:/home/ethant# cat test.sh
> >> #!/bin/sh
> >> /sbin/dump -0auf - /dev/rwd0a | gzip | \
> >>   ssh [EMAIL PROTECTED] "cat > /grits/$(date "+%Y%m%d")_root.dump.gz"
> >>
> >> [EMAIL PROTECTED]:/home/ethant# sudo test.sh
> >>  DUMP: Date of this level 0 dump: Fri Aug 25 00:23:42 2006
> >> ...
> >> [EMAIL PROTECTED]'s password:
> >>
> >> What am I doing wrong?
> >
> >Here you are running the entire script as root (using sudo), and
> >therefore ssh is run as root, which does not have your keys.
> 
> Understood but how come the exact setup works from my system corn to
> rice ( but not grits to rice)?  corn is 3.8, grits is 3.9, and rice is
> 4.0. 
 
Check the keys. See if there's a key pair for those remote and local
user combinations that do work.

-- 
You can lead an idiot to knowledge but you cannot make him think.  You can,
however, rectally insert the information, printed on stone tablets, using a
sharpened poker.
              -- Nicolai

Reply via email to