sshexec defaults to port 22

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

sshexec defaults to port 22

Zahid Rahman
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 for pi from 192.168.0.38 port 56286 ssh2 *




*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>
Reply | Threaded
Open this post in threaded view
|

AW: sshexec defaults to port 22

Jan Matèrne (jhm)
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 <[hidden email]>
Gesendet: Dienstag, 12. Januar 2021 04:27
An: [hidden email]
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: [hidden email]
For additional commands, e-mail: [hidden email]