If you are using openssh on the server, run 'man sshd' and read the
section titled "AUTHORIZED_KEYS_FILE_FORMAT". Or check
http://www.openssh.com/, there is a link to manuals on the left side.

Bassically you need to put your public key from host A in the file
~/.ssh/authorized_keys on host B, where ~ is the home directory for
whatever user you trying to connect as. You will need to make sure that
~/.ssh is 700 permissions also. You will want to be sure that you can
authenticate with your key on the command line before you try to do so
with Ant.

In you ant build.xml you need to specify to location of the private key,
relative to ${basedir}, or use an absolute path.

-Rob A

> -----Original Message-----
> From: Brown, Carlton [mailto:[EMAIL PROTECTED] 
> Sent: Friday, April 07, 2006 7:19 AM
> To: [email protected]
> Subject: RE: scp "auth cancel" error
> 
> > -----Original Message-----
> > From: Robert Clark [mailto:[EMAIL PROTECTED]
> > Sent: Wednesday, April 05, 2006 5:41 PM
> > To: [email protected]
> > Cc: Brown, Carlton
> > Subject: Re: scp "auth cancel" error
> > 
> > On Wednesday April 5, 2006 17:23, "Brown, Carlton"
> > <[EMAIL PROTECTED]> wrote:
> > > Can anyone shed light on this scp failure?  It's possible 
> I made a 
> > > mistake although I checked my work.
> > 
> > >       [scp] Connecting to some.host.com:22
> > >
> > > BUILD FAILED
> > >
> > > D:\dev\R2.0\src\test\build.xml:9: com.jcraft.jsch.JSchException:
> > > Auth cancel
> > 
> > >
> > > The target code:
> > >
> > > <target name="ship">
> > >    <scp file="foo.xml"
> > >         todir="[EMAIL PROTECTED]:/var/data"
> > >         passphrase=""
> > >         trust="true"
> > >         verbose="true"
> > >         keyfile="my.pub"/>
> >           ^^^^^^^^^^^^^^^^^^
> > > </target>
> > 
> > I believe the key file should point to your private key, not your 
> > public key.
> 
> Thanks to all who responded... I think something's wrong with 
> my keyfile setup.  I was able to connect using a 
> username/password embedded in the todir attribute which 
> proves at least that ssh connectivity works.
> 
> Obviously hardcoding passwords is not a good idea but I still 
> don't understand which keyfiles need to be referenced 
> where... after I've generated a public and private key, what 
> do I set up on the client and server for this to work?
> 
> The information transmitted is intended only for the person 
> or entity to which it is addressed and may contain 
> confidential, proprietary, and/or privileged material. Any 
> review, retransmission, dissemination or other use of, or 
> taking of any action in reliance upon this information by 
> persons or entities other than the intended recipient is 
> prohibited. If you received this in error, please contact the 
> sender and delete the material from all computers. 163
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED] For 
> additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to