You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Zahid Rahman <za...@gmail.com> on 2021/01/12 23:36:06 UTC
hanging on port 4000
I have made some more progress.
I made another change by adding trust="true" below verbose="true"
the command "touch somefile" ran successfully.
It is now hanging here listening on port 4000.
[sshexec] cmd : java -Xdebug
-Xrunjdwp:server=y,transport=dt_socket,address=4000,suspend=y -jar
org.raspirecipes.helloworld-0.0.1-SNAPSHOT.jar
[sshexec] Listening for transport dt_socket at address: 4000
relevant Sample from /home/zahid/Eclipse Java
Raspi/org.raspirecipes.helloworld/remotedebug.xml
--------------------------------------------------------------------------------------------------------------------------------------------
<echo> test sshexec touch somefile </echo>
<sshexec
host="${raspberrypi}"
username="${username}"
password="${password}"
verbose="true"
trust="true"
command="touch ~/raspirecipe/somefile" />
<echo> test sshexec touched somefile </echo>
<sshexec
host="${raspberrypi}"
username="${username}"
password="${password}"
failonerror="true"
usepty="true"
verbose="true"
trust="true"
command="java -Xdebug
-Xrunjdwp:server=y,transport=dt_socket,address=4000,suspend=y -jar
${jar.filename}" />
-------------------------------------------------------------------------------------------
CONSOLE OUTPUT
Buildfile: /home/zahid/Eclipse Java
Raspi/org.raspirecipes.helloworld/remotedebug.xml
remotedebug:
[echo] "Found application /home/zahid/Eclipse Java
Raspi/org.raspirecipes.helloworld/target/org.raspirecipes.helloworld-0.0.1-SNAPSHOT.jar"
[echo] "Copying application to 192.168.0.22:
~/org.raspirecipes.helloworld-0.0.1-SNAPSHOT.jar"
[scp] Connecting to 192.168.0.22:22
[scp] done.
[echo] "Starting
192.168.0.22:~/org.raspirecipes.helloworld-0.0.1-SNAPSHOT.jar
in debug mode"
[echo] test sshexec touch somefile
[sshexec] Connecting to 192.168.0.22:22
[sshexec] Connecting to 192.168.0.22 port 22
[sshexec] Connection established
[sshexec] Remote version string: SSH-2.0-OpenSSH_7.9p1 Raspbian-10+deb10u2
[sshexec] Local version string: SSH-2.0-JSCH-0.1.54
[sshexec] CheckCiphers:
aes256-ctr,aes192-ctr,aes128-ctr,aes256-cbc,aes192-cbc,aes128-cbc,3des-ctr,arcfour,arcfour128,arcfour256
[sshexec] CheckKexes:
diffie-hellman-group14-sha1,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521
[sshexec] CheckSignatures:
ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521
[sshexec] SSH_MSG_KEXINIT sent
[sshexec] SSH_MSG_KEXINIT received
[sshexec] kex: server: curve25519-sha256,curve25519-sha256@libssh.org
,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group14-sha256,diffie-hellman-group14-sha1
[sshexec] kex: server:
rsa-sha2-512,rsa-sha2-256,ssh-rsa,ecdsa-sha2-nistp256,ssh-ed25519
[sshexec] kex: server: chacha20-poly1305@openssh.com
,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,
aes256-gcm@openssh.com
[sshexec] kex: server: chacha20-poly1305@openssh.com
,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,
aes256-gcm@openssh.com
[sshexec] kex: server: umac-64-etm@openssh.com,umac-128-etm@openssh.com,
hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,
hmac-sha1-etm@openssh.com,umac-64@openssh.com,umac-128@openssh.com
,hmac-sha2-256,hmac-sha2-512,hmac-sha1
[sshexec] kex: server: umac-64-etm@openssh.com,umac-128-etm@openssh.com,
hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,
hmac-sha1-etm@openssh.com,umac-64@openssh.com,umac-128@openssh.com
,hmac-sha2-256,hmac-sha2-512,hmac-sha1
[sshexec] kex: server: none,zlib@openssh.com
[sshexec] kex: server: none,zlib@openssh.com
[sshexec] kex: server:
[sshexec] kex: server:
[sshexec] kex: client:
ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group14-sha1,diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-group1-sha1
[sshexec] kex: client:
ssh-rsa,ssh-dss,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521
[sshexec] kex: client:
aes128-ctr,aes128-cbc,3des-ctr,3des-cbc,blowfish-cbc,aes192-ctr,aes192-cbc,aes256-ctr,aes256-cbc
[sshexec] kex: client:
aes128-ctr,aes128-cbc,3des-ctr,3des-cbc,blowfish-cbc,aes192-ctr,aes192-cbc,aes256-ctr,aes256-cbc
[sshexec] kex: client:
hmac-md5,hmac-sha1,hmac-sha2-256,hmac-sha1-96,hmac-md5-96
[sshexec] kex: client:
hmac-md5,hmac-sha1,hmac-sha2-256,hmac-sha1-96,hmac-md5-96
[sshexec] kex: client: none
[sshexec] kex: client: none
[sshexec] kex: client:
[sshexec] kex: client:
[sshexec] kex: server->client aes128-ctr hmac-sha1 none
[sshexec] kex: client->server aes128-ctr hmac-sha1 none
[sshexec] SSH_MSG_KEX_ECDH_INIT sent
[sshexec] expecting SSH_MSG_KEX_ECDH_REPLY
[sshexec] ssh_rsa_verify: signature true
[sshexec] Permanently added '192.168.0.22' (RSA) to the list of known
hosts.
[sshexec] SSH_MSG_NEWKEYS sent
[sshexec] SSH_MSG_NEWKEYS received
[sshexec] SSH_MSG_SERVICE_REQUEST sent
[sshexec] SSH_MSG_SERVICE_ACCEPT received
[sshexec] Authentications that can continue:
publickey,keyboard-interactive,password
[sshexec] Next authentication method: publickey
[sshexec] Authentications that can continue: password
[sshexec] Next authentication method: password
[sshexec] Authentication succeeded (password).
[sshexec] cmd : touch ~/raspirecipe/somefile
[sshexec] Disconnecting from 192.168.0.22 port 22
[sshexec] Caught an exception, leaving main loop due to Socket closed
[echo] test sshexec touched somefile
[sshexec] Connecting to 192.168.0.22:22
[sshexec] Connecting to 192.168.0.22 port 22
[sshexec] Connection established
[sshexec] Remote version string: SSH-2.0-OpenSSH_7.9p1 Raspbian-10+deb10u2
[sshexec] Local version string: SSH-2.0-JSCH-0.1.54
[sshexec] CheckCiphers:
aes256-ctr,aes192-ctr,aes128-ctr,aes256-cbc,aes192-cbc,aes128-cbc,3des-ctr,arcfour,arcfour128,arcfour256
[sshexec] CheckKexes:
diffie-hellman-group14-sha1,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521
[sshexec] CheckSignatures:
ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521
[sshexec] SSH_MSG_KEXINIT sent
[sshexec] SSH_MSG_KEXINIT received
[sshexec] kex: server: curve25519-sha256,curve25519-sha256@libssh.org
,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group14-sha256,diffie-hellman-group14-sha1
[sshexec] kex: server:
rsa-sha2-512,rsa-sha2-256,ssh-rsa,ecdsa-sha2-nistp256,ssh-ed25519
[sshexec] kex: server: chacha20-poly1305@openssh.com
,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,
aes256-gcm@openssh.com
[sshexec] kex: server: chacha20-poly1305@openssh.com
,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,
aes256-gcm@openssh.com
[sshexec] kex: server: umac-64-etm@openssh.com,umac-128-etm@openssh.com,
hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,
hmac-sha1-etm@openssh.com,umac-64@openssh.com,umac-128@openssh.com
,hmac-sha2-256,hmac-sha2-512,hmac-sha1
[sshexec] kex: server: umac-64-etm@openssh.com,umac-128-etm@openssh.com,
hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,
hmac-sha1-etm@openssh.com,umac-64@openssh.com,umac-128@openssh.com
,hmac-sha2-256,hmac-sha2-512,hmac-sha1
[sshexec] kex: server: none,zlib@openssh.com
[sshexec] kex: server: none,zlib@openssh.com
[sshexec] kex: server:
[sshexec] kex: server:
[sshexec] kex: client:
ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group14-sha1,diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-group1-sha1
[sshexec] kex: client:
ssh-rsa,ssh-dss,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521
[sshexec] kex: client:
aes128-ctr,aes128-cbc,3des-ctr,3des-cbc,blowfish-cbc,aes192-ctr,aes192-cbc,aes256-ctr,aes256-cbc
[sshexec] kex: client:
aes128-ctr,aes128-cbc,3des-ctr,3des-cbc,blowfish-cbc,aes192-ctr,aes192-cbc,aes256-ctr,aes256-cbc
[sshexec] kex: client:
hmac-md5,hmac-sha1,hmac-sha2-256,hmac-sha1-96,hmac-md5-96
[sshexec] kex: client:
hmac-md5,hmac-sha1,hmac-sha2-256,hmac-sha1-96,hmac-md5-96
[sshexec] kex: client: none
[sshexec] kex: client: none
[sshexec] kex: client:
[sshexec] kex: client:
[sshexec] kex: server->client aes128-ctr hmac-sha1 none
[sshexec] kex: client->server aes128-ctr hmac-sha1 none
[sshexec] SSH_MSG_KEX_ECDH_INIT sent
[sshexec] expecting SSH_MSG_KEX_ECDH_REPLY
[sshexec] ssh_rsa_verify: signature true
[sshexec] Permanently added '192.168.0.22' (RSA) to the list of known
hosts.
[sshexec] SSH_MSG_NEWKEYS sent
[sshexec] SSH_MSG_NEWKEYS received
[sshexec] SSH_MSG_SERVICE_REQUEST sent
[sshexec] SSH_MSG_SERVICE_ACCEPT received
[sshexec] Authentications that can continue:
publickey,keyboard-interactive,password
[sshexec] Next authentication method: publickey
[sshexec] Authentications that can continue: password
[sshexec] Next authentication method: password
[sshexec] Authentication succeeded (password).
[sshexec] cmd : java -Xdebug
-Xrunjdwp:server=y,transport=dt_socket,address=4000,suspend=y -jar
org.raspirecipes.helloworld-0.0.1-SNAPSHOT.jar
[sshexec] Listening for transport dt_socket at address: 4000
---------------------------------------------------------------------------------------
/home/zahid/Eclipse Java Raspi/org.raspirecipes.helloworld/remotedebug.xml
specifically line 31.
line 26 <sshexec
line 27 host="${raspberrypi}"
line 28 username="${username}"
line 29 password="${password}"
line 30 verbose="true"
line 31 command="touch somefile"/>
line 32 <echo> test sshexec touched somefile </echo>
-----------------------------------------------------------------------------------
and the contents of /home/zahid/Eclipse Java
Raspi/org.raspirecipes.helloworld/remotedebug.xml
specifically line 31?
________________________________
From: Zahid Rahman <za...@gmail.com>
Sent: Tuesday, January 12, 2021 11:12 AM
To: user@ant.apache.org <us...@ant.apache.org>
Subject: test of <sshexec
I tested the <sshexec tag with the changes below ( touch somefile),
returns same error message of com.jcraft.jsch.JSchException: reject
HostKey: 192.168.0.22.
<?xml version="1.0" encoding="UTF-8"?>
<project name="deploy" default="remotedebug" basedir=".">
<property name="raspberrypi" value="192.168.0.22" />
<property name="raspberryfolder" value="~/raspirecipe" />
<property name="username" value="pi" />
<property name="password" value="raspberry" />
<target name="remotedebug">
<first id="jars">
<fileset dir="target" includes="**/*.jar" />
</first>
<pathconvert pathsep="," property="jar.path" refid="jars" />
<basename file="${jar.path}" property="jar.filename" />
<echo>"Found application ${jar.path}"</echo>
<echo>"Copying application to
${raspberrypi}:${raspberryfolder}/${jar.filename}"</echo>
<scp localfile="${jar.path}"
todir="${username}:${password}@${raspberrypi}:${raspberryfolder}"
trust="true" />
<echo>"Starting ${raspberrypi}:${raspberryfolder}/${jar.filename} in
debug mode"</echo>
<echo> test sshexec touch somefile </echo>
<sshexec
host="${raspberrypi}"
username="${username}"
password="${password}"
verbose="true"
command="touch somefile"/>
<echo> test sshexec touched somefile </echo>
<!--
<sshexec
host="${raspberrypi}"
username="${username}"
password="${password}"
failonerror="true"
usepty="true"
verbose="true"
command="java -Xdebug
-Xrunjdwp:server=y,transport=dt_socket,address=4000,suspend=y -jar
${jar.filename}" />
-->
</target>
</project>
Buildfile: /home/zahid/Eclipse Java
Raspi/org.raspirecipes.helloworld/remotedebug.xml
remotedebug:
[echo] "Found application /home/zahid/Eclipse Java
Raspi/org.raspirecipes.helloworld/target/org.raspirecipes.helloworld-0.0.1-SNAPSHOT.jar"
[echo] "Copying application to 192.168.0.22:
~/raspirecipe/org.raspirecipes.helloworld-0.0.1-SNAPSHOT.jar"
[scp] Connecting to 192.168.0.22:22
[scp] done.
[echo] "Starting
192.168.0.22:~/raspirecipe/org.raspirecipes.helloworld-0.0.1-SNAPSHOT.jar
in debug mode"
[echo] test sshexec touch somefile
[sshexec] Connecting to 192.168.0.22:22
[sshexec] Connecting to 192.168.0.22 port 22
[sshexec] Connection established
[sshexec] Remote version string: SSH-2.0-OpenSSH_7.9p1 Raspbian-10+deb10u2
[sshexec] Local version string: SSH-2.0-JSCH-0.1.54
[sshexec] CheckCiphers:
aes256-ctr,aes192-ctr,aes128-ctr,aes256-cbc,aes192-cbc,aes128-cbc,3des-ctr,arcfour,arcfour128,arcfour256
[sshexec] CheckKexes:
diffie-hellman-group14-sha1,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521
[sshexec] CheckSignatures:
ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521
[sshexec] SSH_MSG_KEXINIT sent
[sshexec] SSH_MSG_KEXINIT received
[sshexec] kex: server: curve25519-sha256,curve25519-sha256@libssh.org
,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group14-sha256,diffie-hellman-group14-sha1
[sshexec] kex: server:
rsa-sha2-512,rsa-sha2-256,ssh-rsa,ecdsa-sha2-nistp256,ssh-ed25519
[sshexec] kex: server: chacha20-poly1305@openssh.com
,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,
aes256-gcm@openssh.com
[sshexec] kex: server: chacha20-poly1305@openssh.com
,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,
aes256-gcm@openssh.com
[sshexec] kex: server: umac-64-etm@openssh.com,umac-128-etm@openssh.com,
hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,
hmac-sha1-etm@openssh.com,umac-64@openssh.com,umac-128@openssh.com
,hmac-sha2-256,hmac-sha2-512,hmac-sha1
[sshexec] kex: server: umac-64-etm@openssh.com,umac-128-etm@openssh.com,
hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,
hmac-sha1-etm@openssh.com,umac-64@openssh.com,umac-128@openssh.com
,hmac-sha2-256,hmac-sha2-512,hmac-sha1
[sshexec] kex: server: none,zlib@openssh.com
[sshexec] kex: server: none,zlib@openssh.com
[sshexec] kex: server:
[sshexec] kex: server:
[sshexec] kex: client:
ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group14-sha1,diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-group1-sha1
[sshexec] kex: client:
ssh-rsa,ssh-dss,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521
[sshexec] kex: client:
aes128-ctr,aes128-cbc,3des-ctr,3des-cbc,blowfish-cbc,aes192-ctr,aes192-cbc,aes256-ctr,aes256-cbc
[sshexec] kex: client:
aes128-ctr,aes128-cbc,3des-ctr,3des-cbc,blowfish-cbc,aes192-ctr,aes192-cbc,aes256-ctr,aes256-cbc
[sshexec] kex: client:
hmac-md5,hmac-sha1,hmac-sha2-256,hmac-sha1-96,hmac-md5-96
[sshexec] kex: client:
hmac-md5,hmac-sha1,hmac-sha2-256,hmac-sha1-96,hmac-md5-96
[sshexec] kex: client: none
[sshexec] kex: client: none
[sshexec] kex: client:
[sshexec] kex: client:
[sshexec] kex: server->client aes128-ctr hmac-sha1 none
[sshexec] kex: client->server aes128-ctr hmac-sha1 none
[sshexec] SSH_MSG_KEX_ECDH_INIT sent
[sshexec] expecting SSH_MSG_KEX_ECDH_REPLY
[sshexec] ssh_rsa_verify: signature true
[sshexec] Disconnecting from 192.168.0.22 port 22
BUILD FAILED
/home/zahid/Eclipse Java
Raspi/org.raspirecipes.helloworld/remotedebug.xml:31:
com.jcraft.jsch.JSchException: reject HostKey: 192.168.0.22
<http://www.backbutton.co.uk>
Re: hanging on port 4000
Posted by Zahid Rahman <za...@gmail.com>.
It's sorted.
I get this message because I was running in debug mode and I had a break
point in main ().
So I had to go to eclipse main menu
Run - > debug configuration ->
Under remote java application ->
select configuration file created earlier
-> debug button.
I was then prompted by eclipse to switch debug perspective .
Then I pressed f6 (step over).
The program completed. SUCCESS.
So now I have taken the raspberry pi java programs found here www.pi4j.com
and now I am running them in eclipse IDE remotely as a headless rasberry
pi.
I could run do headless graphic development through VNC viewer. However I
would be using the pi processor for compilation.
Using remote java eclipse the benefit is I am doing the compilation on my
laptop and the running on raspberry pi.
Thank you for all the responses.
Z.
https://www.backbutton.co.uk/
¯\_(ツ)_/¯
♡۶♡۶ ♡۶
On Wed, 13 Jan 2021, 18:25 Martin Gainty, <mg...@hotmail.com> wrote:
> server is waiting for a request
> do you have a list of the enumerated request functions?
> if org.raspirecipes.helloworld-0.0.1-SNAPSHOT.jar contains a servlet main
> class which contains a Requested Function called foo
> curl --request 192.168.0.22:4000 GET foo
>
> to be more specific...where is your code code that produces this message
> Caught an exception, leaving main loop due to Socket closed
>
> ------------------------------
> *From:* Zahid Rahman <za...@gmail.com>
> *Sent:* Tuesday, January 12, 2021 6:36 PM
> *To:* user@ant.apache.org <us...@ant.apache.org>; mgainty@hotmail.com <
> mgainty@hotmail.com>
> *Subject:* hanging on port 4000
>
>
> I have made some more progress.
> I made another change by adding trust="true" below verbose="true"
> the command "touch somefile" ran successfully.
>
> It is now hanging here listening on port 4000.
> [sshexec] cmd : java -Xdebug
> -Xrunjdwp:server=y,transport=dt_socket,address=4000,suspend=y -jar
> org.raspirecipes.helloworld-0.0.1-SNAPSHOT.jar
> [sshexec] Listening for transport dt_socket at address: 4000
>
>
> relevant Sample from /home/zahid/Eclipse Java
> Raspi/org.raspirecipes.helloworld/remotedebug.xml
>
> --------------------------------------------------------------------------------------------------------------------------------------------
>
> <echo> test sshexec touch somefile </echo>
> <sshexec
> host="${raspberrypi}"
> username="${username}"
> password="${password}"
> verbose="true"
> trust="true"
> command="touch ~/raspirecipe/somefile" />
>
> <echo> test sshexec touched somefile </echo>
>
> <sshexec
> host="${raspberrypi}"
> username="${username}"
> password="${password}"
> failonerror="true"
> usepty="true"
> verbose="true"
> trust="true"
> command="java -Xdebug
> -Xrunjdwp:server=y,transport=dt_socket,address=4000,suspend=y -jar
> ${jar.filename}" />
>
>
> -------------------------------------------------------------------------------------------
>
> CONSOLE OUTPUT
>
> Buildfile: /home/zahid/Eclipse Java
> Raspi/org.raspirecipes.helloworld/remotedebug.xml
> remotedebug:
> [echo] "Found application /home/zahid/Eclipse Java
> Raspi/org.raspirecipes.helloworld/target/org.raspirecipes.helloworld-0.0.1-SNAPSHOT.jar"
> [echo] "Copying application to 192.168.0.22:
> ~/org.raspirecipes.helloworld-0.0.1-SNAPSHOT.jar"
> [scp] Connecting to 192.168.0.22:22
> [scp] done.
> [echo] "Starting 192.168.0.22:~/org.raspirecipes.helloworld-0.0.1-SNAPSHOT.jar
> in debug mode"
> [echo] test sshexec touch somefile
> [sshexec] Connecting to 192.168.0.22:22
> [sshexec] Connecting to 192.168.0.22 port 22
> [sshexec] Connection established
> [sshexec] Remote version string: SSH-2.0-OpenSSH_7.9p1
> Raspbian-10+deb10u2
> [sshexec] Local version string: SSH-2.0-JSCH-0.1.54
> [sshexec] CheckCiphers:
> aes256-ctr,aes192-ctr,aes128-ctr,aes256-cbc,aes192-cbc,aes128-cbc,3des-ctr,arcfour,arcfour128,arcfour256
> [sshexec] CheckKexes:
> diffie-hellman-group14-sha1,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521
> [sshexec] CheckSignatures:
> ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521
> [sshexec] SSH_MSG_KEXINIT sent
> [sshexec] SSH_MSG_KEXINIT received
> [sshexec] kex: server: curve25519-sha256,curve25519-sha256@libssh.org
> ,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group14-sha256,diffie-hellman-group14-sha1
> [sshexec] kex: server:
> rsa-sha2-512,rsa-sha2-256,ssh-rsa,ecdsa-sha2-nistp256,ssh-ed25519
> [sshexec] kex: server: chacha20-poly1305@openssh.com
> ,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,
> aes256-gcm@openssh.com
> [sshexec] kex: server: chacha20-poly1305@openssh.com
> ,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,
> aes256-gcm@openssh.com
> [sshexec] kex: server: umac-64-etm@openssh.com,umac-128-etm@openssh.com,
> hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,
> hmac-sha1-etm@openssh.com,umac-64@openssh.com,umac-128@openssh.com
> ,hmac-sha2-256,hmac-sha2-512,hmac-sha1
> [sshexec] kex: server: umac-64-etm@openssh.com,umac-128-etm@openssh.com,
> hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,
> hmac-sha1-etm@openssh.com,umac-64@openssh.com,umac-128@openssh.com
> ,hmac-sha2-256,hmac-sha2-512,hmac-sha1
> [sshexec] kex: server: none,zlib@openssh.com
> [sshexec] kex: server: none,zlib@openssh.com
> [sshexec] kex: server:
> [sshexec] kex: server:
> [sshexec] kex: client:
> ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group14-sha1,diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-group1-sha1
> [sshexec] kex: client:
> ssh-rsa,ssh-dss,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521
> [sshexec] kex: client:
> aes128-ctr,aes128-cbc,3des-ctr,3des-cbc,blowfish-cbc,aes192-ctr,aes192-cbc,aes256-ctr,aes256-cbc
> [sshexec] kex: client:
> aes128-ctr,aes128-cbc,3des-ctr,3des-cbc,blowfish-cbc,aes192-ctr,aes192-cbc,aes256-ctr,aes256-cbc
> [sshexec] kex: client:
> hmac-md5,hmac-sha1,hmac-sha2-256,hmac-sha1-96,hmac-md5-96
> [sshexec] kex: client:
> hmac-md5,hmac-sha1,hmac-sha2-256,hmac-sha1-96,hmac-md5-96
> [sshexec] kex: client: none
> [sshexec] kex: client: none
> [sshexec] kex: client:
> [sshexec] kex: client:
> [sshexec] kex: server->client aes128-ctr hmac-sha1 none
> [sshexec] kex: client->server aes128-ctr hmac-sha1 none
> [sshexec] SSH_MSG_KEX_ECDH_INIT sent
> [sshexec] expecting SSH_MSG_KEX_ECDH_REPLY
> [sshexec] ssh_rsa_verify: signature true
> [sshexec] Permanently added '192.168.0.22' (RSA) to the list of known
> hosts.
> [sshexec] SSH_MSG_NEWKEYS sent
> [sshexec] SSH_MSG_NEWKEYS received
> [sshexec] SSH_MSG_SERVICE_REQUEST sent
> [sshexec] SSH_MSG_SERVICE_ACCEPT received
> [sshexec] Authentications that can continue:
> publickey,keyboard-interactive,password
> [sshexec] Next authentication method: publickey
> [sshexec] Authentications that can continue: password
> [sshexec] Next authentication method: password
> [sshexec] Authentication succeeded (password).
> [sshexec] cmd : touch ~/raspirecipe/somefile
> [sshexec] Disconnecting from 192.168.0.22 port 22
> [sshexec] Caught an exception, leaving main loop due to Socket closed
> [echo] test sshexec touched somefile
> [sshexec] Connecting to 192.168.0.22:22
> [sshexec] Connecting to 192.168.0.22 port 22
> [sshexec] Connection established
> [sshexec] Remote version string: SSH-2.0-OpenSSH_7.9p1
> Raspbian-10+deb10u2
> [sshexec] Local version string: SSH-2.0-JSCH-0.1.54
> [sshexec] CheckCiphers:
> aes256-ctr,aes192-ctr,aes128-ctr,aes256-cbc,aes192-cbc,aes128-cbc,3des-ctr,arcfour,arcfour128,arcfour256
> [sshexec] CheckKexes:
> diffie-hellman-group14-sha1,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521
> [sshexec] CheckSignatures:
> ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521
> [sshexec] SSH_MSG_KEXINIT sent
> [sshexec] SSH_MSG_KEXINIT received
> [sshexec] kex: server: curve25519-sha256,curve25519-sha256@libssh.org
> ,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group14-sha256,diffie-hellman-group14-sha1
> [sshexec] kex: server:
> rsa-sha2-512,rsa-sha2-256,ssh-rsa,ecdsa-sha2-nistp256,ssh-ed25519
> [sshexec] kex: server: chacha20-poly1305@openssh.com
> ,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,
> aes256-gcm@openssh.com
> [sshexec] kex: server: chacha20-poly1305@openssh.com
> ,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,
> aes256-gcm@openssh.com
> [sshexec] kex: server: umac-64-etm@openssh.com,umac-128-etm@openssh.com,
> hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,
> hmac-sha1-etm@openssh.com,umac-64@openssh.com,umac-128@openssh.com
> ,hmac-sha2-256,hmac-sha2-512,hmac-sha1
> [sshexec] kex: server: umac-64-etm@openssh.com,umac-128-etm@openssh.com,
> hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,
> hmac-sha1-etm@openssh.com,umac-64@openssh.com,umac-128@openssh.com
> ,hmac-sha2-256,hmac-sha2-512,hmac-sha1
> [sshexec] kex: server: none,zlib@openssh.com
> [sshexec] kex: server: none,zlib@openssh.com
> [sshexec] kex: server:
> [sshexec] kex: server:
> [sshexec] kex: client:
> ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group14-sha1,diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-group1-sha1
> [sshexec] kex: client:
> ssh-rsa,ssh-dss,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521
> [sshexec] kex: client:
> aes128-ctr,aes128-cbc,3des-ctr,3des-cbc,blowfish-cbc,aes192-ctr,aes192-cbc,aes256-ctr,aes256-cbc
> [sshexec] kex: client:
> aes128-ctr,aes128-cbc,3des-ctr,3des-cbc,blowfish-cbc,aes192-ctr,aes192-cbc,aes256-ctr,aes256-cbc
> [sshexec] kex: client:
> hmac-md5,hmac-sha1,hmac-sha2-256,hmac-sha1-96,hmac-md5-96
> [sshexec] kex: client:
> hmac-md5,hmac-sha1,hmac-sha2-256,hmac-sha1-96,hmac-md5-96
> [sshexec] kex: client: none
> [sshexec] kex: client: none
> [sshexec] kex: client:
> [sshexec] kex: client:
> [sshexec] kex: server->client aes128-ctr hmac-sha1 none
> [sshexec] kex: client->server aes128-ctr hmac-sha1 none
> [sshexec] SSH_MSG_KEX_ECDH_INIT sent
> [sshexec] expecting SSH_MSG_KEX_ECDH_REPLY
> [sshexec] ssh_rsa_verify: signature true
> [sshexec] Permanently added '192.168.0.22' (RSA) to the list of known
> hosts.
> [sshexec] SSH_MSG_NEWKEYS sent
> [sshexec] SSH_MSG_NEWKEYS received
> [sshexec] SSH_MSG_SERVICE_REQUEST sent
> [sshexec] SSH_MSG_SERVICE_ACCEPT received
> [sshexec] Authentications that can continue:
> publickey,keyboard-interactive,password
> [sshexec] Next authentication method: publickey
> [sshexec] Authentications that can continue: password
> [sshexec] Next authentication method: password
> [sshexec] Authentication succeeded (password).
> [sshexec] cmd : java -Xdebug
> -Xrunjdwp:server=y,transport=dt_socket,address=4000,suspend=y -jar
> org.raspirecipes.helloworld-0.0.1-SNAPSHOT.jar
> [sshexec] Listening for transport dt_socket at address: 4000
>
>
>
>
>
>
> ---------------------------------------------------------------------------------------
>
> /home/zahid/Eclipse Java Raspi/org.raspirecipes.helloworld/remotedebug.xml
> specifically line 31.
>
> line 26 <sshexec
> line 27 host="${raspberrypi}"
> line 28 username="${username}"
> line 29 password="${password}"
> line 30 verbose="true"
> line 31 command="touch somefile"/>
> line 32 <echo> test sshexec touched somefile </echo>
>
>
> -----------------------------------------------------------------------------------
>
> and the contents of /home/zahid/Eclipse Java
> Raspi/org.raspirecipes.helloworld/remotedebug.xml
>
> specifically line 31?
>
> ________________________________
> From: Zahid Rahman <za...@gmail.com>
> Sent: Tuesday, January 12, 2021 11:12 AM
> To: user@ant.apache.org <us...@ant.apache.org>
> Subject: test of <sshexec
>
> I tested the <sshexec tag with the changes below ( touch somefile),
> returns same error message of com.jcraft.jsch.JSchException: reject
> HostKey: 192.168.0.22.
>
> <?xml version="1.0" encoding="UTF-8"?>
> <project name="deploy" default="remotedebug" basedir=".">
> <property name="raspberrypi" value="192.168.0.22" />
> <property name="raspberryfolder" value="~/raspirecipe" />
> <property name="username" value="pi" />
> <property name="password" value="raspberry" />
>
> <target name="remotedebug">
> <first id="jars">
> <fileset dir="target" includes="**/*.jar" />
> </first>
> <pathconvert pathsep="," property="jar.path" refid="jars" />
> <basename file="${jar.path}" property="jar.filename" />
> <echo>"Found application ${jar.path}"</echo>
>
> <echo>"Copying application to
> ${raspberrypi}:${raspberryfolder}/${jar.filename}"</echo>
> <scp localfile="${jar.path}"
> todir="${username}:${password}@${raspberrypi}:${raspberryfolder}"
> trust="true" />
>
> <echo>"Starting ${raspberrypi}:${raspberryfolder}/${jar.filename} in
> debug mode"</echo>
>
>
> <echo> test sshexec touch somefile </echo>
>
> <sshexec
> host="${raspberrypi}"
> username="${username}"
> password="${password}"
> verbose="true"
> command="touch somefile"/>
>
> <echo> test sshexec touched somefile </echo>
>
> <!--
> <sshexec
> host="${raspberrypi}"
> username="${username}"
> password="${password}"
> failonerror="true"
> usepty="true"
> verbose="true"
> command="java -Xdebug
> -Xrunjdwp:server=y,transport=dt_socket,address=4000,suspend=y -jar
> ${jar.filename}" />
> -->
>
> </target>
> </project>
>
>
> Buildfile: /home/zahid/Eclipse Java
> Raspi/org.raspirecipes.helloworld/remotedebug.xml
> remotedebug:
> [echo] "Found application /home/zahid/Eclipse Java
>
> Raspi/org.raspirecipes.helloworld/target/org.raspirecipes.helloworld-0.0.1-SNAPSHOT.jar"
> [echo] "Copying application to 192.168.0.22:
> ~/raspirecipe/org.raspirecipes.helloworld-0.0.1-SNAPSHOT.jar"
> [scp] Connecting to 192.168.0.22:22
> [scp] done.
> [echo] "Starting
> 192.168.0.22:~/raspirecipe/org.raspirecipes.helloworld-0.0.1-SNAPSHOT.jar
> in debug mode"
> [echo] test sshexec touch somefile
> [sshexec] Connecting to 192.168.0.22:22
> [sshexec] Connecting to 192.168.0.22 port 22
> [sshexec] Connection established
> [sshexec] Remote version string: SSH-2.0-OpenSSH_7.9p1 Raspbian-10+deb10u2
> [sshexec] Local version string: SSH-2.0-JSCH-0.1.54
> [sshexec] CheckCiphers:
>
> aes256-ctr,aes192-ctr,aes128-ctr,aes256-cbc,aes192-cbc,aes128-cbc,3des-ctr,arcfour,arcfour128,arcfour256
> [sshexec] CheckKexes:
>
> diffie-hellman-group14-sha1,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521
> [sshexec] CheckSignatures:
> ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521
> [sshexec] SSH_MSG_KEXINIT sent
> [sshexec] SSH_MSG_KEXINIT received
> [sshexec] kex: server: curve25519-sha256,curve25519-sha256@libssh.org
>
> ,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group14-sha256,diffie-hellman-group14-sha1
> [sshexec] kex: server:
> rsa-sha2-512,rsa-sha2-256,ssh-rsa,ecdsa-sha2-nistp256,ssh-ed25519
> [sshexec] kex: server: chacha20-poly1305@openssh.com
> ,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,
> aes256-gcm@openssh.com
> [sshexec] kex: server: chacha20-poly1305@openssh.com
> ,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,
> aes256-gcm@openssh.com
> [sshexec] kex: server: umac-64-etm@openssh.com,umac-128-etm@openssh.com,
> hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,
> hmac-sha1-etm@openssh.com,umac-64@openssh.com,umac-128@openssh.com
> ,hmac-sha2-256,hmac-sha2-512,hmac-sha1
> [sshexec] kex: server: umac-64-etm@openssh.com,umac-128-etm@openssh.com,
> hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,
> hmac-sha1-etm@openssh.com,umac-64@openssh.com,umac-128@openssh.com
> ,hmac-sha2-256,hmac-sha2-512,hmac-sha1
> [sshexec] kex: server: none,zlib@openssh.com
> [sshexec] kex: server: none,zlib@openssh.com
> [sshexec] kex: server:
> [sshexec] kex: server:
> [sshexec] kex: client:
>
> ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group14-sha1,diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-group1-sha1
> [sshexec] kex: client:
> ssh-rsa,ssh-dss,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521
> [sshexec] kex: client:
>
> aes128-ctr,aes128-cbc,3des-ctr,3des-cbc,blowfish-cbc,aes192-ctr,aes192-cbc,aes256-ctr,aes256-cbc
> [sshexec] kex: client:
>
> aes128-ctr,aes128-cbc,3des-ctr,3des-cbc,blowfish-cbc,aes192-ctr,aes192-cbc,aes256-ctr,aes256-cbc
> [sshexec] kex: client:
> hmac-md5,hmac-sha1,hmac-sha2-256,hmac-sha1-96,hmac-md5-96
> [sshexec] kex: client:
> hmac-md5,hmac-sha1,hmac-sha2-256,hmac-sha1-96,hmac-md5-96
> [sshexec] kex: client: none
> [sshexec] kex: client: none
> [sshexec] kex: client:
> [sshexec] kex: client:
> [sshexec] kex: server->client aes128-ctr hmac-sha1 none
> [sshexec] kex: client->server aes128-ctr hmac-sha1 none
> [sshexec] SSH_MSG_KEX_ECDH_INIT sent
> [sshexec] expecting SSH_MSG_KEX_ECDH_REPLY
> [sshexec] ssh_rsa_verify: signature true
> [sshexec] Disconnecting from 192.168.0.22 port 22
>
> BUILD FAILED
> /home/zahid/Eclipse Java
> Raspi/org.raspirecipes.helloworld/remotedebug.xml:31:
> com.jcraft.jsch.JSchException: reject HostKey: 192.168.0.22
>
>
> <http://www.backbutton.co.uk>
>
Re: hanging on port 4000
Posted by Zahid Rahman <za...@gmail.com>.
> Caught an exception, leaving main loop due to Socket closed
I do get this message only when I run in verbose mode ( verbose="true").
I got this message after I completed the steps described in the previous
email.
The message is misleading. There is no exception. The program completed.
Z.
https://www.backbutton.co.uk/
¯\_(ツ)_/¯
♡۶♡۶ ♡۶
On Wed, 13 Jan 2021, 18:25 Martin Gainty, <mg...@hotmail.com> wrote:
> server is waiting for a request
> do you have a list of the enumerated request functions?
> if org.raspirecipes.helloworld-0.0.1-SNAPSHOT.jar contains a servlet main
> class which contains a Requested Function called foo
> curl --request 192.168.0.22:4000 GET foo
>
> to be more specific...where is your code code that produces this message
> Caught an exception, leaving main loop due to Socket closed
>
> ------------------------------
> *From:* Zahid Rahman <za...@gmail.com>
> *Sent:* Tuesday, January 12, 2021 6:36 PM
> *To:* user@ant.apache.org <us...@ant.apache.org>; mgainty@hotmail.com <
> mgainty@hotmail.com>
> *Subject:* hanging on port 4000
>
>
> I have made some more progress.
> I made another change by adding trust="true" below verbose="true"
> the command "touch somefile" ran successfully.
>
> It is now hanging here listening on port 4000.
> [sshexec] cmd : java -Xdebug
> -Xrunjdwp:server=y,transport=dt_socket,address=4000,suspend=y -jar
> org.raspirecipes.helloworld-0.0.1-SNAPSHOT.jar
> [sshexec] Listening for transport dt_socket at address: 4000
>
>
> relevant Sample from /home/zahid/Eclipse Java
> Raspi/org.raspirecipes.helloworld/remotedebug.xml
>
> --------------------------------------------------------------------------------------------------------------------------------------------
>
> <echo> test sshexec touch somefile </echo>
> <sshexec
> host="${raspberrypi}"
> username="${username}"
> password="${password}"
> verbose="true"
> trust="true"
> command="touch ~/raspirecipe/somefile" />
>
> <echo> test sshexec touched somefile </echo>
>
> <sshexec
> host="${raspberrypi}"
> username="${username}"
> password="${password}"
> failonerror="true"
> usepty="true"
> verbose="true"
> trust="true"
> command="java -Xdebug
> -Xrunjdwp:server=y,transport=dt_socket,address=4000,suspend=y -jar
> ${jar.filename}" />
>
>
> -------------------------------------------------------------------------------------------
>
> CONSOLE OUTPUT
>
> Buildfile: /home/zahid/Eclipse Java
> Raspi/org.raspirecipes.helloworld/remotedebug.xml
> remotedebug:
> [echo] "Found application /home/zahid/Eclipse Java
> Raspi/org.raspirecipes.helloworld/target/org.raspirecipes.helloworld-0.0.1-SNAPSHOT.jar"
> [echo] "Copying application to 192.168.0.22:
> ~/org.raspirecipes.helloworld-0.0.1-SNAPSHOT.jar"
> [scp] Connecting to 192.168.0.22:22
> [scp] done.
> [echo] "Starting 192.168.0.22:~/org.raspirecipes.helloworld-0.0.1-SNAPSHOT.jar
> in debug mode"
> [echo] test sshexec touch somefile
> [sshexec] Connecting to 192.168.0.22:22
> [sshexec] Connecting to 192.168.0.22 port 22
> [sshexec] Connection established
> [sshexec] Remote version string: SSH-2.0-OpenSSH_7.9p1
> Raspbian-10+deb10u2
> [sshexec] Local version string: SSH-2.0-JSCH-0.1.54
> [sshexec] CheckCiphers:
> aes256-ctr,aes192-ctr,aes128-ctr,aes256-cbc,aes192-cbc,aes128-cbc,3des-ctr,arcfour,arcfour128,arcfour256
> [sshexec] CheckKexes:
> diffie-hellman-group14-sha1,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521
> [sshexec] CheckSignatures:
> ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521
> [sshexec] SSH_MSG_KEXINIT sent
> [sshexec] SSH_MSG_KEXINIT received
> [sshexec] kex: server: curve25519-sha256,curve25519-sha256@libssh.org
> ,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group14-sha256,diffie-hellman-group14-sha1
> [sshexec] kex: server:
> rsa-sha2-512,rsa-sha2-256,ssh-rsa,ecdsa-sha2-nistp256,ssh-ed25519
> [sshexec] kex: server: chacha20-poly1305@openssh.com
> ,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,
> aes256-gcm@openssh.com
> [sshexec] kex: server: chacha20-poly1305@openssh.com
> ,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,
> aes256-gcm@openssh.com
> [sshexec] kex: server: umac-64-etm@openssh.com,umac-128-etm@openssh.com,
> hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,
> hmac-sha1-etm@openssh.com,umac-64@openssh.com,umac-128@openssh.com
> ,hmac-sha2-256,hmac-sha2-512,hmac-sha1
> [sshexec] kex: server: umac-64-etm@openssh.com,umac-128-etm@openssh.com,
> hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,
> hmac-sha1-etm@openssh.com,umac-64@openssh.com,umac-128@openssh.com
> ,hmac-sha2-256,hmac-sha2-512,hmac-sha1
> [sshexec] kex: server: none,zlib@openssh.com
> [sshexec] kex: server: none,zlib@openssh.com
> [sshexec] kex: server:
> [sshexec] kex: server:
> [sshexec] kex: client:
> ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group14-sha1,diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-group1-sha1
> [sshexec] kex: client:
> ssh-rsa,ssh-dss,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521
> [sshexec] kex: client:
> aes128-ctr,aes128-cbc,3des-ctr,3des-cbc,blowfish-cbc,aes192-ctr,aes192-cbc,aes256-ctr,aes256-cbc
> [sshexec] kex: client:
> aes128-ctr,aes128-cbc,3des-ctr,3des-cbc,blowfish-cbc,aes192-ctr,aes192-cbc,aes256-ctr,aes256-cbc
> [sshexec] kex: client:
> hmac-md5,hmac-sha1,hmac-sha2-256,hmac-sha1-96,hmac-md5-96
> [sshexec] kex: client:
> hmac-md5,hmac-sha1,hmac-sha2-256,hmac-sha1-96,hmac-md5-96
> [sshexec] kex: client: none
> [sshexec] kex: client: none
> [sshexec] kex: client:
> [sshexec] kex: client:
> [sshexec] kex: server->client aes128-ctr hmac-sha1 none
> [sshexec] kex: client->server aes128-ctr hmac-sha1 none
> [sshexec] SSH_MSG_KEX_ECDH_INIT sent
> [sshexec] expecting SSH_MSG_KEX_ECDH_REPLY
> [sshexec] ssh_rsa_verify: signature true
> [sshexec] Permanently added '192.168.0.22' (RSA) to the list of known
> hosts.
> [sshexec] SSH_MSG_NEWKEYS sent
> [sshexec] SSH_MSG_NEWKEYS received
> [sshexec] SSH_MSG_SERVICE_REQUEST sent
> [sshexec] SSH_MSG_SERVICE_ACCEPT received
> [sshexec] Authentications that can continue:
> publickey,keyboard-interactive,password
> [sshexec] Next authentication method: publickey
> [sshexec] Authentications that can continue: password
> [sshexec] Next authentication method: password
> [sshexec] Authentication succeeded (password).
> [sshexec] cmd : touch ~/raspirecipe/somefile
> [sshexec] Disconnecting from 192.168.0.22 port 22
> [sshexec] Caught an exception, leaving main loop due to Socket closed
> [echo] test sshexec touched somefile
> [sshexec] Connecting to 192.168.0.22:22
> [sshexec] Connecting to 192.168.0.22 port 22
> [sshexec] Connection established
> [sshexec] Remote version string: SSH-2.0-OpenSSH_7.9p1
> Raspbian-10+deb10u2
> [sshexec] Local version string: SSH-2.0-JSCH-0.1.54
> [sshexec] CheckCiphers:
> aes256-ctr,aes192-ctr,aes128-ctr,aes256-cbc,aes192-cbc,aes128-cbc,3des-ctr,arcfour,arcfour128,arcfour256
> [sshexec] CheckKexes:
> diffie-hellman-group14-sha1,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521
> [sshexec] CheckSignatures:
> ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521
> [sshexec] SSH_MSG_KEXINIT sent
> [sshexec] SSH_MSG_KEXINIT received
> [sshexec] kex: server: curve25519-sha256,curve25519-sha256@libssh.org
> ,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group14-sha256,diffie-hellman-group14-sha1
> [sshexec] kex: server:
> rsa-sha2-512,rsa-sha2-256,ssh-rsa,ecdsa-sha2-nistp256,ssh-ed25519
> [sshexec] kex: server: chacha20-poly1305@openssh.com
> ,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,
> aes256-gcm@openssh.com
> [sshexec] kex: server: chacha20-poly1305@openssh.com
> ,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,
> aes256-gcm@openssh.com
> [sshexec] kex: server: umac-64-etm@openssh.com,umac-128-etm@openssh.com,
> hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,
> hmac-sha1-etm@openssh.com,umac-64@openssh.com,umac-128@openssh.com
> ,hmac-sha2-256,hmac-sha2-512,hmac-sha1
> [sshexec] kex: server: umac-64-etm@openssh.com,umac-128-etm@openssh.com,
> hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,
> hmac-sha1-etm@openssh.com,umac-64@openssh.com,umac-128@openssh.com
> ,hmac-sha2-256,hmac-sha2-512,hmac-sha1
> [sshexec] kex: server: none,zlib@openssh.com
> [sshexec] kex: server: none,zlib@openssh.com
> [sshexec] kex: server:
> [sshexec] kex: server:
> [sshexec] kex: client:
> ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group14-sha1,diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-group1-sha1
> [sshexec] kex: client:
> ssh-rsa,ssh-dss,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521
> [sshexec] kex: client:
> aes128-ctr,aes128-cbc,3des-ctr,3des-cbc,blowfish-cbc,aes192-ctr,aes192-cbc,aes256-ctr,aes256-cbc
> [sshexec] kex: client:
> aes128-ctr,aes128-cbc,3des-ctr,3des-cbc,blowfish-cbc,aes192-ctr,aes192-cbc,aes256-ctr,aes256-cbc
> [sshexec] kex: client:
> hmac-md5,hmac-sha1,hmac-sha2-256,hmac-sha1-96,hmac-md5-96
> [sshexec] kex: client:
> hmac-md5,hmac-sha1,hmac-sha2-256,hmac-sha1-96,hmac-md5-96
> [sshexec] kex: client: none
> [sshexec] kex: client: none
> [sshexec] kex: client:
> [sshexec] kex: client:
> [sshexec] kex: server->client aes128-ctr hmac-sha1 none
> [sshexec] kex: client->server aes128-ctr hmac-sha1 none
> [sshexec] SSH_MSG_KEX_ECDH_INIT sent
> [sshexec] expecting SSH_MSG_KEX_ECDH_REPLY
> [sshexec] ssh_rsa_verify: signature true
> [sshexec] Permanently added '192.168.0.22' (RSA) to the list of known
> hosts.
> [sshexec] SSH_MSG_NEWKEYS sent
> [sshexec] SSH_MSG_NEWKEYS received
> [sshexec] SSH_MSG_SERVICE_REQUEST sent
> [sshexec] SSH_MSG_SERVICE_ACCEPT received
> [sshexec] Authentications that can continue:
> publickey,keyboard-interactive,password
> [sshexec] Next authentication method: publickey
> [sshexec] Authentications that can continue: password
> [sshexec] Next authentication method: password
> [sshexec] Authentication succeeded (password).
> [sshexec] cmd : java -Xdebug
> -Xrunjdwp:server=y,transport=dt_socket,address=4000,suspend=y -jar
> org.raspirecipes.helloworld-0.0.1-SNAPSHOT.jar
> [sshexec] Listening for transport dt_socket at address: 4000
>
>
>
>
>
>
> ---------------------------------------------------------------------------------------
>
> /home/zahid/Eclipse Java Raspi/org.raspirecipes.helloworld/remotedebug.xml
> specifically line 31.
>
> line 26 <sshexec
> line 27 host="${raspberrypi}"
> line 28 username="${username}"
> line 29 password="${password}"
> line 30 verbose="true"
> line 31 command="touch somefile"/>
> line 32 <echo> test sshexec touched somefile </echo>
>
>
> -----------------------------------------------------------------------------------
>
> and the contents of /home/zahid/Eclipse Java
> Raspi/org.raspirecipes.helloworld/remotedebug.xml
>
> specifically line 31?
>
> ________________________________
> From: Zahid Rahman <za...@gmail.com>
> Sent: Tuesday, January 12, 2021 11:12 AM
> To: user@ant.apache.org <us...@ant.apache.org>
> Subject: test of <sshexec
>
> I tested the <sshexec tag with the changes below ( touch somefile),
> returns same error message of com.jcraft.jsch.JSchException: reject
> HostKey: 192.168.0.22.
>
> <?xml version="1.0" encoding="UTF-8"?>
> <project name="deploy" default="remotedebug" basedir=".">
> <property name="raspberrypi" value="192.168.0.22" />
> <property name="raspberryfolder" value="~/raspirecipe" />
> <property name="username" value="pi" />
> <property name="password" value="raspberry" />
>
> <target name="remotedebug">
> <first id="jars">
> <fileset dir="target" includes="**/*.jar" />
> </first>
> <pathconvert pathsep="," property="jar.path" refid="jars" />
> <basename file="${jar.path}" property="jar.filename" />
> <echo>"Found application ${jar.path}"</echo>
>
> <echo>"Copying application to
> ${raspberrypi}:${raspberryfolder}/${jar.filename}"</echo>
> <scp localfile="${jar.path}"
> todir="${username}:${password}@${raspberrypi}:${raspberryfolder}"
> trust="true" />
>
> <echo>"Starting ${raspberrypi}:${raspberryfolder}/${jar.filename} in
> debug mode"</echo>
>
>
> <echo> test sshexec touch somefile </echo>
>
> <sshexec
> host="${raspberrypi}"
> username="${username}"
> password="${password}"
> verbose="true"
> command="touch somefile"/>
>
> <echo> test sshexec touched somefile </echo>
>
> <!--
> <sshexec
> host="${raspberrypi}"
> username="${username}"
> password="${password}"
> failonerror="true"
> usepty="true"
> verbose="true"
> command="java -Xdebug
> -Xrunjdwp:server=y,transport=dt_socket,address=4000,suspend=y -jar
> ${jar.filename}" />
> -->
>
> </target>
> </project>
>
>
> Buildfile: /home/zahid/Eclipse Java
> Raspi/org.raspirecipes.helloworld/remotedebug.xml
> remotedebug:
> [echo] "Found application /home/zahid/Eclipse Java
>
> Raspi/org.raspirecipes.helloworld/target/org.raspirecipes.helloworld-0.0.1-SNAPSHOT.jar"
> [echo] "Copying application to 192.168.0.22:
> ~/raspirecipe/org.raspirecipes.helloworld-0.0.1-SNAPSHOT.jar"
> [scp] Connecting to 192.168.0.22:22
> [scp] done.
> [echo] "Starting
> 192.168.0.22:~/raspirecipe/org.raspirecipes.helloworld-0.0.1-SNAPSHOT.jar
> in debug mode"
> [echo] test sshexec touch somefile
> [sshexec] Connecting to 192.168.0.22:22
> [sshexec] Connecting to 192.168.0.22 port 22
> [sshexec] Connection established
> [sshexec] Remote version string: SSH-2.0-OpenSSH_7.9p1 Raspbian-10+deb10u2
> [sshexec] Local version string: SSH-2.0-JSCH-0.1.54
> [sshexec] CheckCiphers:
>
> aes256-ctr,aes192-ctr,aes128-ctr,aes256-cbc,aes192-cbc,aes128-cbc,3des-ctr,arcfour,arcfour128,arcfour256
> [sshexec] CheckKexes:
>
> diffie-hellman-group14-sha1,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521
> [sshexec] CheckSignatures:
> ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521
> [sshexec] SSH_MSG_KEXINIT sent
> [sshexec] SSH_MSG_KEXINIT received
> [sshexec] kex: server: curve25519-sha256,curve25519-sha256@libssh.org
>
> ,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group14-sha256,diffie-hellman-group14-sha1
> [sshexec] kex: server:
> rsa-sha2-512,rsa-sha2-256,ssh-rsa,ecdsa-sha2-nistp256,ssh-ed25519
> [sshexec] kex: server: chacha20-poly1305@openssh.com
> ,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,
> aes256-gcm@openssh.com
> [sshexec] kex: server: chacha20-poly1305@openssh.com
> ,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,
> aes256-gcm@openssh.com
> [sshexec] kex: server: umac-64-etm@openssh.com,umac-128-etm@openssh.com,
> hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,
> hmac-sha1-etm@openssh.com,umac-64@openssh.com,umac-128@openssh.com
> ,hmac-sha2-256,hmac-sha2-512,hmac-sha1
> [sshexec] kex: server: umac-64-etm@openssh.com,umac-128-etm@openssh.com,
> hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,
> hmac-sha1-etm@openssh.com,umac-64@openssh.com,umac-128@openssh.com
> ,hmac-sha2-256,hmac-sha2-512,hmac-sha1
> [sshexec] kex: server: none,zlib@openssh.com
> [sshexec] kex: server: none,zlib@openssh.com
> [sshexec] kex: server:
> [sshexec] kex: server:
> [sshexec] kex: client:
>
> ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group14-sha1,diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-group1-sha1
> [sshexec] kex: client:
> ssh-rsa,ssh-dss,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521
> [sshexec] kex: client:
>
> aes128-ctr,aes128-cbc,3des-ctr,3des-cbc,blowfish-cbc,aes192-ctr,aes192-cbc,aes256-ctr,aes256-cbc
> [sshexec] kex: client:
>
> aes128-ctr,aes128-cbc,3des-ctr,3des-cbc,blowfish-cbc,aes192-ctr,aes192-cbc,aes256-ctr,aes256-cbc
> [sshexec] kex: client:
> hmac-md5,hmac-sha1,hmac-sha2-256,hmac-sha1-96,hmac-md5-96
> [sshexec] kex: client:
> hmac-md5,hmac-sha1,hmac-sha2-256,hmac-sha1-96,hmac-md5-96
> [sshexec] kex: client: none
> [sshexec] kex: client: none
> [sshexec] kex: client:
> [sshexec] kex: client:
> [sshexec] kex: server->client aes128-ctr hmac-sha1 none
> [sshexec] kex: client->server aes128-ctr hmac-sha1 none
> [sshexec] SSH_MSG_KEX_ECDH_INIT sent
> [sshexec] expecting SSH_MSG_KEX_ECDH_REPLY
> [sshexec] ssh_rsa_verify: signature true
> [sshexec] Disconnecting from 192.168.0.22 port 22
>
> BUILD FAILED
> /home/zahid/Eclipse Java
> Raspi/org.raspirecipes.helloworld/remotedebug.xml:31:
> com.jcraft.jsch.JSchException: reject HostKey: 192.168.0.22
>
>
> <http://www.backbutton.co.uk>
>