Hanging on port 4000. OOPS! it worked

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Hanging on port 4000. OOPS! it worked

Zahid Rahman
I forgot I had set a break point.
So it worked I now have remote development in Java for raspberry pi using
eclipse.



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,[hidden email]
,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: [hidden email]
,aes128-ctr,aes192-ctr,aes256-ctr,[hidden email],
[hidden email]
  [sshexec] kex: server: [hidden email]
,aes128-ctr,aes192-ctr,aes256-ctr,[hidden email],
[hidden email]
  [sshexec] kex: server: [hidden email],[hidden email],
[hidden email],[hidden email],
[hidden email],[hidden email],[hidden email]
,hmac-sha2-256,hmac-sha2-512,hmac-sha1
  [sshexec] kex: server: [hidden email],[hidden email],
[hidden email],[hidden email],
[hidden email],[hidden email],[hidden email]
,hmac-sha2-256,hmac-sha2-512,hmac-sha1
  [sshexec] kex: server: none,[hidden email]
  [sshexec] kex: server: none,[hidden email]
  [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,[hidden email]
,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: [hidden email]
,aes128-ctr,aes192-ctr,aes256-ctr,[hidden email],
[hidden email]
  [sshexec] kex: server: [hidden email]
,aes128-ctr,aes192-ctr,aes256-ctr,[hidden email],
[hidden email]
  [sshexec] kex: server: [hidden email],[hidden email],
[hidden email],[hidden email],
[hidden email],[hidden email],[hidden email]
,hmac-sha2-256,hmac-sha2-512,hmac-sha1
  [sshexec] kex: server: [hidden email],[hidden email],
[hidden email],[hidden email],
[hidden email],[hidden email],[hidden email]
,hmac-sha2-256,hmac-sha2-512,hmac-sha1
  [sshexec] kex: server: none,[hidden email]
  [sshexec] kex: server: none,[hidden email]
  [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 <[hidden email]>
Sent: Tuesday, January 12, 2021 11:12 AM
To: [hidden email] <[hidden email]>
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,[hidden email]
,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: [hidden email]
,aes128-ctr,aes192-ctr,aes256-ctr,[hidden email],
[hidden email]
[sshexec] kex: server: [hidden email]
,aes128-ctr,aes192-ctr,aes256-ctr,[hidden email],
[hidden email]
[sshexec] kex: server: [hidden email],[hidden email],
[hidden email],[hidden email],
[hidden email],[hidden email],[hidden email]
,hmac-sha2-256,hmac-sha2-512,hmac-sha1
[sshexec] kex: server: [hidden email],[hidden email],
[hidden email],[hidden email],
[hidden email],[hidden email],[hidden email]
,hmac-sha2-256,hmac-sha2-512,hmac-sha1
[sshexec] kex: server: none,[hidden email]
[sshexec] kex: server: none,[hidden email]
[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>
Reply | Threaded
Open this post in threaded view
|

AW: Hanging on port 4000. OOPS! it worked

Jan Matèrne (jhm)
Good to hear.
Have fun ;-)

Jan

-----Ursprüngliche Nachricht-----
Von: Zahid Rahman <[hidden email]>
Gesendet: Mittwoch, 13. Januar 2021 01:16
An: [hidden email]
Betreff: Hanging on port 4000. OOPS! it worked

I forgot I had set a break point.
So it worked I now have remote development in Java for raspberry pi using eclipse.



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,[hidden email]
,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: [hidden email] ,aes128-ctr,aes192-ctr,aes256-ctr,[hidden email],
[hidden email]
  [sshexec] kex: server: [hidden email] ,aes128-ctr,aes192-ctr,aes256-ctr,[hidden email],
[hidden email]
  [sshexec] kex: server: [hidden email],[hidden email],
[hidden email],[hidden email],
[hidden email],[hidden email],[hidden email]
,hmac-sha2-256,hmac-sha2-512,hmac-sha1
  [sshexec] kex: server: [hidden email],[hidden email],
[hidden email],[hidden email],
[hidden email],[hidden email],[hidden email]
,hmac-sha2-256,hmac-sha2-512,hmac-sha1
  [sshexec] kex: server: none,[hidden email]
  [sshexec] kex: server: none,[hidden email]
  [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,[hidden email]
,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: [hidden email] ,aes128-ctr,aes192-ctr,aes256-ctr,[hidden email],
[hidden email]
  [sshexec] kex: server: [hidden email] ,aes128-ctr,aes192-ctr,aes256-ctr,[hidden email],
[hidden email]
  [sshexec] kex: server: [hidden email],[hidden email],
[hidden email],[hidden email],
[hidden email],[hidden email],[hidden email]
,hmac-sha2-256,hmac-sha2-512,hmac-sha1
  [sshexec] kex: server: [hidden email],[hidden email],
[hidden email],[hidden email],
[hidden email],[hidden email],[hidden email]
,hmac-sha2-256,hmac-sha2-512,hmac-sha1
  [sshexec] kex: server: none,[hidden email]
  [sshexec] kex: server: none,[hidden email]
  [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 <[hidden email]>
Sent: Tuesday, January 12, 2021 11:12 AM
To: [hidden email] <[hidden email]>
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,[hidden email]
,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: [hidden email] ,aes128-ctr,aes192-ctr,aes256-ctr,[hidden email],
[hidden email]
[sshexec] kex: server: [hidden email] ,aes128-ctr,aes192-ctr,aes256-ctr,[hidden email],
[hidden email]
[sshexec] kex: server: [hidden email],[hidden email],
[hidden email],[hidden email],
[hidden email],[hidden email],[hidden email]
,hmac-sha2-256,hmac-sha2-512,hmac-sha1
[sshexec] kex: server: [hidden email],[hidden email],
[hidden email],[hidden email],
[hidden email],[hidden email],[hidden email]
,hmac-sha2-256,hmac-sha2-512,hmac-sha1
[sshexec] kex: server: none,[hidden email] [sshexec] kex: server: none,[hidden email] [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>


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]