Sometimes, ssh connection fails with java.io.IOException: Hostkey signature sent by remote is wrong!

631 views
Skip to first unread message

Adrian Sulumberchean

unread,
Feb 9, 2014, 12:57:27 PM2/9/14
to connectb...@googlegroups.com
Hi guys,

I'm trying to establish a ssh connection with a custom GUI but sometimes if the remote server is rebooted, when I try to reconnect, I get the following output:

02-09 19:44:37.170: D/SSH(20449): Verifying ssh-rsa signature
02-09 19:46:09.200: W/System.err(20449): java.io.IOException: Hostkey signature sent by remote is wrong!
02-09 19:46:09.200: W/System.err(20449): at com.trilead.ssh2.transport.KexManager.handleMessage(KexManager.java:660)
02-09 19:46:09.200: W/System.err(20449): at com.trilead.ssh2.transport.TransportManager.receiveLoop(TransportManager.java:781)
02-09 19:46:09.210: W/System.err(20449): at com.trilead.ssh2.transport.TransportManager$1.run(TransportManager.java:475)
02-09 19:46:09.210: W/System.err(20449): at java.lang.Thread.run(Thread.java:856)

Do you have any ideas on how can I fix this? 

Also, please let me know if you need any extra info on this.

l00g33k

unread,
Feb 10, 2014, 12:25:45 PM2/10/14
to connectb...@googlegroups.com
Seeing no other response, and have not messed with the code myself, I can
only guess on the following:

> Hostkey signature sent by remote is wrong!

May be this isn't a programming error but an error/warning without a popup
dialog?

Some systems regenerate their host keys on reboot, and ssh is saying that the
host
key is not the same as the last time. Normally this is a problem because some
one
may have hijacked the IP address and put in a fake host server to steal data.
But this probably isn't your case.

If you can modify the code to ignore this error and accept any new ones,
you might get around this problem.

The normal response that I have seen is a dialog pops up asking to proceed any
way.

Good luck.


Best Regards,

----- Original Message -----
From: "Adrian Sulumberchean" <zull...@gmail.com>
To: <connectb...@googlegroups.com>
Sent: Sunday, February 09, 2014 9:57 AM
Subject: Sometimes, ssh connection fails with java.io.IOException: Hostkey
signature sent by remote is wrong!


> Hi guys,
>
> I'm trying to establish a ssh connection with a custom GUI but sometimes if
> the remote server is rebooted, when I try to reconnect, I get the following
> output:
>
> 02-09 19:44:37.170: D/SSH(20449): Verifying ssh-rsa signature
> 02-09 19:46:09.200: W/System.err(20449): java.io.IOException: Hostkey
> signature sent by remote is wrong!
> 02-09 19:46:09.200: W/System.err(20449): at
> com.trilead.ssh2.transport.KexManager.handleMessage(KexManager.java:660)
> 02-09 19:46:09.200: W/System.err(20449): at
> com.trilead.ssh2.transport.TransportManager.receiveLoop(TransportManager.java:781)
> 02-09 19:46:09.210: W/System.err(20449): at
> com.trilead.ssh2.transport.TransportManager$1.run(TransportManager.java:475)
> 02-09 19:46:09.210: W/System.err(20449): at
> java.lang.Thread.run(Thread.java:856)
>
> Do you have any ideas on how can I fix this?
>
> Also, please let me know if you need any extra info on this.
>
> --
> You received this message because you are subscribed to the Google Groups
> "ConnectBot Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to connectbot-use...@googlegroups.com.
> To post to this group, send email to connectb...@googlegroups.com.
> Visit this group at http://groups.google.com/group/connectbot-users.
> For more options, visit https://groups.google.com/groups/opt_out.
>

Adrian Sulumberchean

unread,
Feb 11, 2014, 11:08:11 AM2/11/14
to connectb...@googlegroups.com
Indeed, this is not a pop up dialog. I will change the code to ignore this error and see if everything works out fine. Thank you.


On Mon, Feb 10, 2014 at 7:25 PM, l00g33k <l00...@gmail.com> wrote:
Seeing no other response, and have not messed with the code myself, I can
only guess on the following:

Hostkey signature sent by remote is wrong!

May be this isn't a programming error but an error/warning without a popup
dialog?

Some systems regenerate their host keys on reboot, and ssh is saying that the host
key is not the same as the last time. Normally this is a problem because some one
may have hijacked the IP address and put in a fake host server to steal data.
But this probably isn't your case.

If you can modify the code to ignore this error and accept any new ones,
you might get around this problem.

The normal response that I have seen is a dialog pops up asking to proceed any way.

Good luck.


Best Regards,

----- Original Message ----- From: "Adrian Sulumberchean" <zull...@gmail.com>

Sent: Sunday, February 09, 2014 9:57 AM
Subject: Sometimes, ssh connection fails with java.io.IOException: Hostkey signature sent by remote is wrong!


Hi guys,

I'm trying to establish a ssh connection with a custom GUI but sometimes if
the remote server is rebooted, when I try to reconnect, I get the following
output:

02-09 19:44:37.170: D/SSH(20449): Verifying ssh-rsa signature
02-09 19:46:09.200: W/System.err(20449): java.io.IOException: Hostkey
signature sent by remote is wrong!
02-09 19:46:09.200: W/System.err(20449): at
com.trilead.ssh2.transport.KexManager.handleMessage(KexManager.java:660)
02-09 19:46:09.200: W/System.err(20449): at
com.trilead.ssh2.transport.TransportManager.receiveLoop(TransportManager.java:781)
02-09 19:46:09.210: W/System.err(20449): at
com.trilead.ssh2.transport.TransportManager$1.run(TransportManager.java:475)
02-09 19:46:09.210: W/System.err(20449): at
java.lang.Thread.run(Thread.java:856)

Do you have any ideas on how can I fix this?

Also, please let me know if you need any extra info on this.


--
You received this message because you are subscribed to the Google Groups "ConnectBot Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to connectbot-users+unsubscribe@googlegroups.com.
To post to this group, send email to connectbot-users@googlegroups.com.

--
You received this message because you are subscribed to a topic in the Google Groups "ConnectBot Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/connectbot-users/6hiRoHq9QgI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to connectbot-users+unsubscribe@googlegroups.com.
To post to this group, send email to connectbot-users@googlegroups.com.

Adrian Sulumberchean

unread,
Feb 11, 2014, 12:02:45 PM2/11/14
to connectb...@googlegroups.com
I've just tried to ignore the ssh verification (I'm not sure if this was the right thing to do) but now I get:

java.net.SocketException: recvfrom failed: ECONNRESET (Connection reset by peer)
Caused by: libcore.io.ErrnoException: recvfrom failed: ECONNRESET (Connection reset by peer)

Do you have any idea how can I fix this properly?

Reply all
Reply to author
Forward
0 new messages