# Wifi & ssh disconnection problems - bad packet length

## PM17E5

Whenever I'm on wifi (well I haven't had much of a chance to use regular wired connections) and I'm using ssh, I'll often get disconnected with a simple error message that says "bad packet length" and "Disconnecting: Packet corrupt". Does anyone have any ideas about where I should begin to look? Is this something that is unavoidable with wireless? I'm guessing that it's not, because it would be a lot to put up with for every person using wireless. I often find myself logging in 50 times a day, and it gets extremely frustrating. My signal is average.

----------

## dmpogo

 *PM17E5 wrote:*   

> Whenever I'm on wifi (well I haven't had much of a chance to use regular wired connections) and I'm using ssh, I'll often get disconnected with a simple error message that says "bad packet length" and "Disconnecting: Packet corrupt". Does anyone have any ideas about where I should begin to look? Is this something that is unavoidable with wireless? I'm guessing that it's not, because it would be a lot to put up with for every person using wireless. I often find myself logging in 50 times a day, and it gets extremely frustrating. My signal is average.

 

Well, I don't know about 'packet corrupt' messages, but in general, using ssh over unstable link, you can look at disabling TCPKeepAlive packets (on by default) on server (in sshd_config) and/or client (ssh_config) side.  On a client side you can look at (disabled by default) ServerAliveInterval  parameter instead of TCPKeepAlive

----------

## PM17E5

The problem is though this happens even during times when plenty of interaction is happening. Which makes me assume that disabling those would be of no use.

----------

