You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Christopher Styles <st...@gmail.com> on 2008/01/30 17:37:42 UTC

Can't connect to unix server from windows server...

Hi,

I'm trying to run a target from my Windows 2003 Server build box to connect
to a solaris server to execute a command, but I'm getting "
com.jcraft.jsch.JSchException: Auth fail"... Does anyone know how to resolve
this issue...??

<target name="stop-web-server">
<sshexec host="${hostname}"
 username="${username}"
 password="${password}"
 trust="true"
 command="/local/sys/was/profiles/App01/bin/stopServer.sh server1 -user
Admin -password password"/>
</target>

Thanks
Chris

RE: Can't connect to unix server from windows server...

Posted by "Anderson, Rob (Global Trade)" <Ro...@nike.com>.
<echo> the ${username},${password},${hostname} in your target and make
sure they are set to what you expect.

What version of jsch.jar are you using?

-Rob Anderson

-----Original Message-----
From: Christopher Styles [mailto:styles706@gmail.com] 
Sent: Wednesday, January 30, 2008 9:36 AM
To: Ant Users List
Subject: Re: Can't connect to unix server from windows server...

Yes, I can connect via Putty... I'm thinking maybe my jsch.jar is out of
date... Although, I'm not sure that's the issue...





On 1/30/08, Steve Loughran <st...@apache.org> wrote:
>
> Christopher Styles wrote:
> > Hi,
> >
> > I'm trying to run a target from my Windows 2003 Server build box to
> connect
> > to a solaris server to execute a command, but I'm getting "
> > com.jcraft.jsch.JSchException: Auth fail"... Does anyone know how to
> resolve
> > this issue...??
> >
> > <target name="stop-web-server">
> > <sshexec host="${hostname}"
> >  username="${username}"
> >  password="${password}"
> >  trust="true"
> >  command="/local/sys/was/profiles/App01/bin/stopServer.sh server1
-user
> > Admin -password password"/>
> > </target>
> >
>
> this generally means it didnt authorise you. Password or known hosts
are
> often the problem. Can you connect from Putty on the box?
>
> --
> 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
>
>


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


Re: Can't connect to unix server from windows server...

Posted by Christopher Styles <st...@gmail.com>.
Yes, I can connect via Putty... I'm thinking maybe my jsch.jar is out of
date... Although, I'm not sure that's the issue...





On 1/30/08, Steve Loughran <st...@apache.org> wrote:
>
> Christopher Styles wrote:
> > Hi,
> >
> > I'm trying to run a target from my Windows 2003 Server build box to
> connect
> > to a solaris server to execute a command, but I'm getting "
> > com.jcraft.jsch.JSchException: Auth fail"... Does anyone know how to
> resolve
> > this issue...??
> >
> > <target name="stop-web-server">
> > <sshexec host="${hostname}"
> >  username="${username}"
> >  password="${password}"
> >  trust="true"
> >  command="/local/sys/was/profiles/App01/bin/stopServer.sh server1 -user
> > Admin -password password"/>
> > </target>
> >
>
> this generally means it didnt authorise you. Password or known hosts are
> often the problem. Can you connect from Putty on the box?
>
> --
> 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
>
>

Re: Can't connect to unix server from windows server...

Posted by Steve Loughran <st...@apache.org>.
Christopher Styles wrote:
> Hi,
> 
> I'm trying to run a target from my Windows 2003 Server build box to connect
> to a solaris server to execute a command, but I'm getting "
> com.jcraft.jsch.JSchException: Auth fail"... Does anyone know how to resolve
> this issue...??
> 
> <target name="stop-web-server">
> <sshexec host="${hostname}"
>  username="${username}"
>  password="${password}"
>  trust="true"
>  command="/local/sys/was/profiles/App01/bin/stopServer.sh server1 -user
> Admin -password password"/>
> </target>
> 

this generally means it didnt authorise you. Password or known hosts are 
often the problem. Can you connect from Putty on the box?

-- 
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


Re: Can't connect to unix server from windows server...

Posted by Atsuhiko Yamanaka <at...@gmail.com>.
2008/1/31, Christopher Styles <st...@gmail.com>:
> Hi,
>
> I'm trying to run a target from my Windows 2003 Server build box to connect
> to a solaris server to execute a command, but I'm getting "
> com.jcraft.jsch.JSchException: Auth fail"... Does anyone know how to resolve
> this issue...??

Which ant version are you using?
The older version had such a problem, because it had not supported
keyboard-interactive authentication.  Of course, the recent version must not
have such a problem.

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