You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Michael Giroux <ml...@gmail.com> on 2007/10/02 02:35:10 UTC

Re: SSH Authentication Errors

Thought you might like to know -- the problem turns out to be user
error.  I was watching the developer use the script, and I assumed
that when he entered the password for the target useid, that he had
configured the script to use the userid associated w/ the password.
As it turns out, he was taking the default which in this script is
${user.name} for which he does not have an account on the remote
system.

After he configured the correct userid for the ssh commands all worked well.

One more thing I'll have to add to the documentation for this script.

Michael

On 9/30/07, Michael Giroux <ml...@gmail.com> wrote:
> I personally do not use passphrase, but I'm not sure what the other
> developer is using on his system (the one having problems).  I'll
> check on Monday.
>
> Thanks
>
> Michael
>
> On 9/29/07, Vihan Pandey <vi...@gmail.com> wrote:
> > > I'm using <scp> and <sshexec> tasks in a build script.  These work
> > > well from my own PC, but when someone tries to run the script from a
> > > different computer, the script fails with an authentication error.
> > >
> > > I have been using <scp> and <sshexec> for so long, I no longer
> > > remember what I did to resolve this issue when I had it.
> > >
> > > We built the Shell.java example app that is distributed with JSch.jar.
> > >  We were able to use Shell to connect to the target system, so it
> > > seems we have some ability to connect, but the ANT scripts continue to
> > > fail.
> >
> > Do you authenticate through password or keys alone or keys + passphrase?
> >
> > Regards,
> >
> > - vihan
> >
> > ---------------------------------------------------------------------
> > 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


Re: SSH Authentication Errors

Posted by Michael Giroux <ml...@gmail.com>.
> One of the aspects of <ssh> and <scp> is that they dont print out enough
> useful info on failure. That is partly for security reasons -you dont
> want your entire organisation to be able to read the password in the
> cruise control logs. At the same time, we could do a lot to improve the
> diagnostics that are there right now, if someone was to sit down and
> write the code and the error messages (oh, and the tests )

Another aspect of these tasks is that most of us (at least at my site)
are not experts in ssh and the variety of protection schemes.  While
digging into this problem, we discovered the keyfile option.  It took
a little more than a day for three of us to discover how to use it.

1. point keyfile at our private key file: id_rsa
2. append our public key (id_rsa.pub) to the authorized_keys2 file in
~/.ssh dir of the target system.

A little more info in the ant docs to describe correct use of keyfile
option would have been very much appreciated.

Michael

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


Re: SSH Authentication Errors

Posted by Steve Loughran <st...@apache.org>.
Michael Giroux wrote:
> Thought you might like to know -- the problem turns out to be user
> error.  I was watching the developer use the script, and I assumed
> that when he entered the password for the target useid, that he had
> configured the script to use the userid associated w/ the password.
> As it turns out, he was taking the default which in this script is
> ${user.name} for which he does not have an account on the remote
> system.
> 
> After he configured the correct userid for the ssh commands all worked well.
> 
> One more thing I'll have to add to the documentation for this script.
> 
> Michael

One of the aspects of <ssh> and <scp> is that they dont print out enough 
useful info on failure. That is partly for security reasons -you dont 
want your entire organisation to be able to read the password in the 
cruise control logs. At the same time, we could do a lot to improve the 
diagnostics that are there right now, if someone was to sit down and 
write the code and the error messages (oh, and the tests )

-- 
Steve Loughran                  http://www.1060.org/blogxter/publish/5
Author: Ant in Action           http://antbook.org/

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