You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by j&h systems <jh...@gmail.com> on 2005/06/01 19:31:48 UTC

Re: Problem with sshexec task: reject HostKey

Hi,

Try setting trust="true" like the following:

<sshexec host="xxx.com" username="root" password="matbeers" trust="true">
</sshexec>

I think if you don't set trust to true, the host key (which is on the
server) will be rejected by your ant ssh task.

Cheers,

Jian

On 7/2/05, Bill Winspur <bw...@wynnon.com> wrote:
> I am using the sshexec task in the following build.xml, under XP Pro
> 
> <?xml version="1.0" encoding="UTF-8"?>
> <project default="sshtry" >
>     <target name="sshtry">
>         <sshexec
>             host="xxx.com"
>             username="root"
>             password="matbeers"
>             command="ls" />
>     </target>
> </project>
> 
>  From which I get the following console output:
> 
> E:\swd\devt\eclipseWkspce\Sysadmin\tomcat\ant\ssh-stuff>ant
> Buildfile: build.xml
> 
> sshtry:
>   [sshexec] Connecting to xxx.com:22
> 
> BUILD FAILED
> E:\swd\devt\eclipseWkspce\Sysadmin\tomcat\ant\ssh-stuff\build.xml:9:
> com.jcraft.jsch.JSchException: reject HostKey
> 
> Total time: 3 seconds
> E:\swd\devt\eclipseWkspce\Sysadmin\tomcat\ant\ssh-stuff>
> 
> The host xxx.com (obfuscated) has a working ssh server that I am able to
> invoke using putty
> (from the same workstation as the above sshexec attempt), or openssh on
> my linux
> workstation. In both cases I'm using the default password
> authentication, which
> is what I wanted to do using sshexec.
> 
> Questions
> 1. What does reject HostKey mean ?
> 2. Might putty and sshexec/jsch be in conflict, occupying the same
> workstation?
> 3. Are there any preparatory configuration steps for use of sshexec that
> I have missed.
>     It took me a while to figure out that the jsch.jar is not included
> in the ant-1.6.2 dist,
>     perhaps there is something else I should have set up.
> 
> Bill.
> 
> ---------------------------------------------------------------------
> 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: Problem with sshexec task: reject HostKey

Posted by j&h systems <jh...@gmail.com>.
The other thing is, since jsch is frequently used. Is it possible to
include it by default into the ant distribution? Any licensing issues?

Jian

On 6/1/05, j&h systems <jh...@gmail.com> wrote:
> Hi,
> 
> Try setting trust="true" like the following:
> 
> <sshexec host="xxx.com" username="root" password="matbeers" trust="true">
> </sshexec>
> 
> I think if you don't set trust to true, the host key (which is on the
> server) will be rejected by your ant ssh task.
> 
> Cheers,
> 
> Jian
> 
> On 7/2/05, Bill Winspur <bw...@wynnon.com> wrote:
> > I am using the sshexec task in the following build.xml, under XP Pro
> >
> > <?xml version="1.0" encoding="UTF-8"?>
> > <project default="sshtry" >
> >     <target name="sshtry">
> >         <sshexec
> >             host="xxx.com"
> >             username="root"
> >             password="matbeers"
> >             command="ls" />
> >     </target>
> > </project>
> >
> >  From which I get the following console output:
> >
> > E:\swd\devt\eclipseWkspce\Sysadmin\tomcat\ant\ssh-stuff>ant
> > Buildfile: build.xml
> >
> > sshtry:
> >   [sshexec] Connecting to xxx.com:22
> >
> > BUILD FAILED
> > E:\swd\devt\eclipseWkspce\Sysadmin\tomcat\ant\ssh-stuff\build.xml:9:
> > com.jcraft.jsch.JSchException: reject HostKey
> >
> > Total time: 3 seconds
> > E:\swd\devt\eclipseWkspce\Sysadmin\tomcat\ant\ssh-stuff>
> >
> > The host xxx.com (obfuscated) has a working ssh server that I am able to
> > invoke using putty
> > (from the same workstation as the above sshexec attempt), or openssh on
> > my linux
> > workstation. In both cases I'm using the default password
> > authentication, which
> > is what I wanted to do using sshexec.
> >
> > Questions
> > 1. What does reject HostKey mean ?
> > 2. Might putty and sshexec/jsch be in conflict, occupying the same
> > workstation?
> > 3. Are there any preparatory configuration steps for use of sshexec that
> > I have missed.
> >     It took me a while to figure out that the jsch.jar is not included
> > in the ant-1.6.2 dist,
> >     perhaps there is something else I should have set up.
> >
> > Bill.
> >
> > ---------------------------------------------------------------------
> > 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: Problem with sshexec task: reject HostKey

Posted by Bill Winspur <bw...@wynnon.com>.
Thanks Jian,
setting trust="true" got sshexec working for me,
Bill

j&h systems wrote:

>Hi,
>
>Try setting trust="true" like the following:
>
><sshexec host="xxx.com" username="root" password="matbeers" trust="true">
></sshexec>
>
>I think if you don't set trust to true, the host key (which is on the
>server) will be rejected by your ant ssh task.
>
>Cheers,
>
>Jian
>
>On 7/2/05, Bill Winspur <bw...@wynnon.com> wrote:
>  
>
>>I am using the sshexec task in the following build.xml, under XP Pro
>>
>><?xml version="1.0" encoding="UTF-8"?>
>><project default="sshtry" >
>>    <target name="sshtry">
>>        <sshexec
>>            host="xxx.com"
>>            username="root"
>>            password="matbeers"
>>            command="ls" />
>>    </target>
>></project>
>>
>> From which I get the following console output:
>>
>>E:\swd\devt\eclipseWkspce\Sysadmin\tomcat\ant\ssh-stuff>ant
>>Buildfile: build.xml
>>
>>sshtry:
>>  [sshexec] Connecting to xxx.com:22
>>
>>BUILD FAILED
>>E:\swd\devt\eclipseWkspce\Sysadmin\tomcat\ant\ssh-stuff\build.xml:9:
>>com.jcraft.jsch.JSchException: reject HostKey
>>
>>Total time: 3 seconds
>>E:\swd\devt\eclipseWkspce\Sysadmin\tomcat\ant\ssh-stuff>
>>
>>The host xxx.com (obfuscated) has a working ssh server that I am able to
>>invoke using putty
>>(from the same workstation as the above sshexec attempt), or openssh on
>>my linux
>>workstation. In both cases I'm using the default password
>>authentication, which
>>is what I wanted to do using sshexec.
>>
>>Questions
>>1. What does reject HostKey mean ?
>>2. Might putty and sshexec/jsch be in conflict, occupying the same
>>workstation?
>>3. Are there any preparatory configuration steps for use of sshexec that
>>I have missed.
>>    It took me a while to figure out that the jsch.jar is not included
>>in the ant-1.6.2 dist,
>>    perhaps there is something else I should have set up.
>>
>>Bill.
>>
>>---------------------------------------------------------------------
>>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
>
>
>
>  
>

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