As you can see from output console. I have made some progress by updating
the remote raspberry pi operating system.
I am not sure what parameter is required to resolve this error message
*com.jcraft.jsch.JSchException:
reject HostKey: 192.168.0.22 *.
I am pretty sure it is this code
<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}" />
*BUILD FAILED/home/zahid/Eclipse Java
Raspi/org.raspirecipes.helloworld/remotedebug.xml:29:
com.jcraft.jsch.JSchException: reject HostKey: 192.168.0.22*
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"
[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,[email protected]
,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: [email protected]
,aes128-ctr,aes192-ctr,aes256-ctr,[email protected],
[email protected]
[sshexec] kex: server: [email protected]
,aes128-ctr,aes192-ctr,aes256-ctr,[email protected],
[email protected]
[sshexec] kex: server: [email protected],[email protected],
[email protected],[email protected],
[email protected],[email protected],[email protected]
,hmac-sha2-256,hmac-sha2-512,hmac-sha1
[sshexec] kex: server: [email protected],[email protected],
[email protected],[email protected],
[email protected],[email protected],[email protected]
,hmac-sha2-256,hmac-sha2-512,hmac-sha1
[sshexec] kex: server: none,[email protected]
[sshexec] kex: server: none,[email protected]
[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:29:
com.jcraft.jsch.JSchException: reject HostKey: 192.168.0.22*
Total time: 968 milliseconds
I think the error is earlier while <scp>ing the jar to the PI.
It seems that an sshd is running on the pi.
Are you sure you have the right credentials? Could you login with this
username+password?
Also you could run Ant with -verbose or -debug to get more details.
The error
com.jcraft.jsch.JSchException: SSH_MSG_DISCONNECT: 2 Too many
authentication failures
comes from the underlying ssh library (jsch). But a little bit
Googling shows that the most
common problem is a wrong username/password.
Jan
-----Ursprüngliche Nachricht-----
Von: Zahid Rahman <[email protected]>
Gesendet: Dienstag, 12. Januar 2021 04:27
An: [email protected]
Betreff: sshexec defaults to port 22
Hi,
I am trying to setup Eclipse Remote development on raspberry pi for
Java as per this page
. http://www.raspirecipes.org/archives/218
Unfortunately something has changed since he did . I have managed to
correct one of the errors.
I suspect this second error is due to the sshexec command in the
remotedebug.xml ant build script.
For me the error message is indicating that it defaults to ssh port 22.
I hope somebody here who has an in depth understanding of sshexec
ant command can give me
the information needed to complete my project.
my eclipse console error message is :
*Buildfile: /home/zahid/Eclipse Java
Raspi/org.raspirecipes.helloworld/remotedebug.xmlremotedebug: [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 <http://192.168.0.22:22>BUILD
FAILED/home/zahid/Eclipse
Java
Raspi/org.raspirecipes.helloworld/remotedebug.xml:18:
com.jcraft.jsch.JSchException: SSH_MSG_DISCONNECT: 2 Too many
authentication failures
*remotedebug.xml file:*
<?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>
<sshexec host="${raspberrypi}"
username="${username}"
password="${password}"
failonerror="true"
usepty="true"
command="java -Xdebug
-Xrunjdwp:server=y,transport=dt_socket,address=4000,suspend=y -jar
${jar.filename}" />
</target>
</project>
<http://www.backbutton.co.uk>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
<http://www.backbutton.co.uk>