SSH error “buffer_get_string_ret: bad string length 13105607” and “buffer_get_string: buffer error”

I had no problem connecting via SSH from all my remote locations to my debian server for a long time, but then all of the sudden I started getting the error shown below. By ‘remote’ I mean there was a firewall and the internet in between (and obviously I was using a port forward) the client and server. The server is the ‘debian’ ssh server.

I was getting the following error connecting from any remote location to my debian server:

Also its important to note every time I tried to connect the number 13105607 would change

NOTE: the above connection was actually done from the ‘debian’ server connecting back in on itself by talking to its firewalls wan port forge.kossboss.com:50005 (which port forwards to localhost port 22 on the same debian server). Either way connecting from any remote client to this debian server produced the above error.

Connecting inside the network (within the firewall) produced no error. So I could connect with any SSH service (winscp, putty etc..)

Here is how a good connection looked like (just the typical common connection):

Or

Researching online: Online resources mention that the error type is due to the key, but I have recreate the key and its still the same type of error.

I had to result down to doing packet captures. I bet there is packet errors. I saw some packets that had incorrect checksums, so I figured the firewall was the culprit.

Solution:
I had a router (not going to mention the brand) that seemed to be causing this (maybe its because I was doing a translated port forward, or maybe just the fact that it was a portforward). But the solution was simple. I just logged in to the router and initiated a firmware upgrade, after it reboot and was loaded with the latest firmware. All of the sudden the ssh connection worked. No longer was I producing the error.

 

 

Leave a Reply

Your email address will not be published. Required fields are marked *