ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Anderson, Rob (Global Trade)" <Rob.Ander...@nike.com>
Subject RE: scp "auth cancel" error
Date Fri, 07 Apr 2006 21:32:47 GMT
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:Carlton.Brown@BellSouth.com] 
> Sent: Friday, April 07, 2006 7:19 AM
> To: user@ant.apache.org
> Subject: RE: scp "auth cancel" error
> 
> > -----Original Message-----
> > From: Robert Clark [mailto:robert.clark@quest.com]
> > Sent: Wednesday, April 05, 2006 5:41 PM
> > To: user@ant.apache.org
> > Cc: Brown, Carlton
> > Subject: Re: scp "auth cancel" error
> > 
> > On Wednesday April 5, 2006 17:23, "Brown, Carlton"
> > <Carlton.Brown@bellsouth.com> 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="someuser@some.host.com:/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: user-unsubscribe@ant.apache.org For 
> additional commands, e-mail: user-help@ant.apache.org
> 
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message